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

Revision 160, 207.7 kB (checked in by yaolu, 13 years ago)

updated the pdf files

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">13:40:29</xslt:param>
6<xslt:param name="XFCrtLocalDateTime">2011-03-30T13:40:29</xslt:param>
7<xslt:param name="XFCrtUTCDate">2011-03-30</xslt:param>
8<xslt:param name="XFCrtUTCTime">11:40:29</xslt:param>
9<xslt:param name="XFCrtUTCDateTime">2011-03-30T11:40:29</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/Hangar</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="12.500" column-number="1"/>
1776                                                                                <fo:table-column column-width="12.500" column-number="2"/>
1777                                                                                <fo:table-column column-width="12.500" column-number="3"/>
1778                                                                                <fo:table-column column-width="12.500" column-number="4"/>
1779                                                                                <fo:table-column column-width="12.500" column-number="5"/><fo:table-column column-width="12.500" column-number="6"/><fo:table-column column-width="12.500" column-number="7"/><fo:table-column column-width="12.500" column-number="8"/>
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><fo:table-cell>
1815                                                                                                        <fo:block> </fo:block>
1816                                                                                                       
1817                                                                                                </fo:table-cell><fo:table-cell>
1818                                                                                                        <fo:block> </fo:block>
1819                                                                                                       
1820                                                                                                </fo:table-cell><fo:table-cell>
1821                                                                                                        <fo:block> </fo:block>
1822                                                                                                       
1823                                                                                                </fo:table-cell>
1824                                                                                        </fo:table-row>
1825                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:porePressure">
1826<fo:table-row>
1827                                                                                                <fo:table-cell>
1828                                                                                                        <fo:block>
1829                                                                                                                <xsl:if test="string(witsml:readingKind)"><fo:inline>
1830<xsl:value-of select="witsml:readingKind"/>
1831</fo:inline></xsl:if>
1832                                                                                                        </fo:block>
1833                                                                                                </fo:table-cell>
1834                                                                                                <fo:table-cell>
1835                                                                                                        <fo:block>
1836                                                                                                                <xsl:if test="string(witsml:equivalentMudWeight)"><fo:inline>
1837<xsl:value-of select="witsml:equivalentMudWeight"/>
1838</fo:inline></xsl:if>
1839                                                                                                        </fo:block>
1840                                                                                                </fo:table-cell>
1841                                                                                                <fo:table-cell>
1842                                                                                                        <fo:block>
1843                                                                                                                <xsl:if test="string(substring(witsml:dTim, 0, 17))"><fo:inline>
1844<xsl:value-of select="substring(witsml:dTim, 0, 17)"/>
1845</fo:inline></xsl:if>
1846                                                                                                        </fo:block>
1847                                                                                                </fo:table-cell>
1848                                                                                                <fo:table-cell>
1849                                                                                                        <fo:block>
1850                                                                                                                <xsl:if test="string(witsml:md)"><fo:inline>
1851<xsl:value-of select="witsml:md"/>
1852</fo:inline></xsl:if>
1853                                                                                                        </fo:block>
1854                                                                                                </fo:table-cell>
1855                                                                                                <fo:table-cell>
1856                                                                                                        <fo:block>
1857                                                                                                                <xsl:if test="string(witsml:tvd)"><fo:inline>
1858<xsl:value-of select="witsml:tvd"/>
1859</fo:inline></xsl:if>
1860                                                                                                        </fo:block>
1861                                                                                                </fo:table-cell><fo:table-cell>
1862                                                                                                        <fo:block> </fo:block>
1863                                                                                                </fo:table-cell><fo:table-cell>
1864                                                                                                        <fo:block> </fo:block>
1865                                                                                                </fo:table-cell><fo:table-cell>
1866                                                                                                        <fo:block> </fo:block>
1867                                                                                                </fo:table-cell>
1868                                                                                        </fo:table-row>
1869</xsl:for-each>
1870                                                                                </fo:table-body>
1871                                                                        </fo:table> </fo:block>
1872                                                        </fo:table-cell>
1873                                                </fo:table-row>
1874                                        </fo:table-body>
1875                                </fo:table>
1876                        </fo:block>
1877<xslt:comment> Survey Station </xslt:comment>
1878                        <fo:block>
1879                                <xsl:variable name="element_drillReportSurveyStation" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportSurveyStation']/xsd:sequence"/>
1880                                <xsl:variable name="url_md">
1881                                        <xsl:value-of select="$element_drillReportSurveyStation//xsd:element[@name='md']/@sawsdl:modelReference"/>
1882                                </xsl:variable>
1883                                <xsl:variable name="url_tvd">
1884                                        <xsl:value-of select="$element_drillReportSurveyStation//xsd:element[@name='tvd']/@sawsdl:modelReference"/>
1885                                </xsl:variable>
1886                                <xsl:variable name="url_incl">
1887                                        <xsl:value-of select="$element_drillReportSurveyStation//xsd:element[@name='incl']/@sawsdl:modelReference"/>
1888                                </xsl:variable>
1889                                <xsl:variable name="url_azi">
1890                                        <xsl:value-of select="$element_drillReportSurveyStation//xsd:element[@name='azi']/@sawsdl:modelReference"/>
1891                                </xsl:variable>
1892                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
1893                                <fo:leader/>
1894                                <fo:table>
1895                                        <fo:table-column column-width="100%"/>
1896                                        <fo:table-body>
1897                                                <fo:table-row font-weight="bold" font-size="14pt">
1898                                                        <fo:table-cell>
1899                                                                <fo:block>
1900                                                                        Survey Station
1901                                                                </fo:block>
1902                                                        </fo:table-cell>
1903                                                </fo:table-row>
1904                                                <fo:table-row>
1905                                                        <fo:table-cell>
1906                                                                <fo:block> </fo:block>
1907                                                        </fo:table-cell>
1908                                                </fo:table-row>
1909                                                <fo:table-row>
1910                                                        <fo:table-cell>
1911                                                                <fo:block><fo:table table-layout="fixed" width="100%" border-collapse="collapse">
1912                                                                                <fo:table-column column-width="12.500" column-number="1"/>
1913                                                                                <fo:table-column column-width="12.500" column-number="2"/>
1914                                                                                <fo:table-column column-width="12.500" column-number="3"/>
1915                                                                                <fo:table-column column-width="12.500" column-number="4"/><fo:table-column column-width="12.500" column-number="5"/><fo:table-column column-width="12.500" column-number="6"/><fo:table-column column-width="12.500" column-number="7"/><fo:table-column column-width="12.500" column-number="8"/>
1916                                                                                <fo:table-body>
1917                                                                                        <fo:table-row font-weight="bold">
1918                                                                                                <fo:table-cell>
1919                                                                                                        <fo:block>
1920                                                                                                                <fo:basic-link external-destination="url({$url_md})">Depth</fo:basic-link>
1921                                                                                                        </fo:block>
1922                                                                                                        <fo:block>mMD</fo:block>
1923                                                                                                </fo:table-cell>
1924                                                                                                <fo:table-cell>
1925                                                                                                        <fo:block>
1926                                                                                                                <fo:basic-link external-destination="url({$url_tvd})">Depth</fo:basic-link>
1927                                                                                                        </fo:block>
1928                                                                                                        <fo:block>mTVD</fo:block>
1929                                                                                                </fo:table-cell>
1930                                                                                                <fo:table-cell>
1931                                                                                                        <fo:block>
1932                                                                                                                <fo:basic-link external-destination="url({$url_incl})">Inclination</fo:basic-link>
1933                                                                                                        </fo:block>
1934                                                                                                </fo:table-cell>
1935                                                                                                <fo:table-cell>
1936                                                                                                        <fo:block>
1937                                                                                                                <fo:basic-link external-destination="url({$url_azi})">Azimuth</fo:basic-link>
1938                                                                                                        </fo:block>
1939                                                                                                </fo:table-cell><fo:table-cell>
1940                                                                                                        <fo:block> </fo:block>
1941                                                                                                </fo:table-cell><fo:table-cell>
1942                                                                                                        <fo:block> </fo:block>
1943                                                                                                </fo:table-cell><fo:table-cell>
1944                                                                                                        <fo:block> </fo:block>
1945                                                                                                </fo:table-cell><fo:table-cell>
1946                                                                                                        <fo:block> </fo:block>
1947                                                                                                </fo:table-cell>
1948                                                                                        </fo:table-row>
1949                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:surveyStation">
1950<fo:table-row>
1951                                                                                                <fo:table-cell>
1952                                                                                                        <fo:block>
1953                                                                                                                <xsl:if test="string(witsml:md)"><fo:inline>
1954<xsl:value-of select="witsml:md"/>
1955</fo:inline></xsl:if>
1956                                                                                                        </fo:block>
1957                                                                                                </fo:table-cell>
1958                                                                                                <fo:table-cell>
1959                                                                                                        <fo:block>
1960                                                                                                                <xsl:if test="string(witsml:tvd)"><fo:inline>
1961<xsl:value-of select="witsml:tvd"/>
1962</fo:inline></xsl:if>
1963                                                                                                        </fo:block>
1964                                                                                                </fo:table-cell>
1965                                                                                                <fo:table-cell>
1966                                                                                                        <fo:block>
1967                                                                                                                <xsl:if test="string(witsml:incl)"><fo:inline>
1968<xsl:value-of select="witsml:incl"/>
1969</fo:inline></xsl:if>
1970                                                                                                        </fo:block>
1971                                                                                                </fo:table-cell>
1972                                                                                                <fo:table-cell>
1973                                                                                                        <fo:block>
1974                                                                                                                <xsl:if test="string(witsml:azi)"><fo:inline>
1975<xsl:value-of select="witsml:azi"/>
1976</fo:inline></xsl:if>
1977                                                                                                        </fo:block>
1978                                                                                                </fo:table-cell><fo:table-cell>
1979                                                                                                        <fo:block> </fo:block>
1980                                                                                                </fo:table-cell><fo:table-cell>
1981                                                                                                        <fo:block> </fo:block>
1982                                                                                                </fo:table-cell><fo:table-cell>
1983                                                                                                        <fo:block> </fo:block>
1984                                                                                                </fo:table-cell><fo:table-cell>
1985                                                                                                        <fo:block> </fo:block>
1986                                                                                                </fo:table-cell>
1987                                                                                        </fo:table-row>
1988</xsl:for-each>
1989                                                                                </fo:table-body>
1990                                                                        </fo:table> </fo:block>
1991                                                        </fo:table-cell>
1992                                                </fo:table-row>
1993                                        </fo:table-body>
1994                                </fo:table>
1995                        </fo:block>
1996<xslt:comment> Log Information </xslt:comment>
1997                        <fo:block>
1998                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
1999                                <fo:leader/>
2000                                <xsl:variable name="element_drillReportLogInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportLogInfo']/xsd:sequence"/>
2001                                <xsl:variable name="url_serviceCompany">
2002                                        <xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='serviceCompany']/@sawsdl:modelReference"/>
2003                                </xsl:variable>
2004                                <xsl:variable name="url_runNumber">
2005                                        <xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='runNumber']/@sawsdl:modelReference"/>
2006                                </xsl:variable>
2007                                <xsl:variable name="url_mdTop">
2008                                        <xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
2009                                </xsl:variable>
2010                                <xsl:variable name="url_mdBottom">
2011                                        <xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='mdBottom']/@sawsdl:modelReference"/>
2012                                </xsl:variable>
2013                                <xsl:variable name="url_tool">
2014                                        <xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='tool']/@sawsdl:modelReference"/>
2015                                </xsl:variable>
2016                                <xsl:variable name="url_tempBHCT">
2017                                        <xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='tempBHCT']/@sawsdl:modelReference"/>
2018                                </xsl:variable>
2019                                <xsl:variable name="url_tempBHST">
2020                                        <xsl:value-of select="$element_drillReportLogInfo//xsd:element[@name='tempBHST']/@sawsdl:modelReference"/>
2021                                </xsl:variable>
2022                                <fo:table>
2023                                        <fo:table-column column-width="100%"/>
2024                                        <fo:table-body>
2025                                                <fo:table-row font-weight="bold" font-size="14pt">
2026                                                        <fo:table-cell>
2027                                                                <fo:block>
2028                                                                        Log Information
2029                                                                </fo:block>
2030                                                        </fo:table-cell>
2031                                                </fo:table-row>
2032                                                <fo:table-row font-weight="bold" font-size="14pt">
2033                                                        <fo:table-cell>
2034                                                                <fo:block> </fo:block>
2035                                                        </fo:table-cell>
2036                                                </fo:table-row>
2037                                                <fo:table-row>
2038                                                        <fo:table-cell>
2039                                                                <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>
2040<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:logInfo/witsml:serviceCompany"/>
2041</fo:inline></xsl:if></fo:block>
2042                                                        </fo:table-cell>
2043                                                </fo:table-row>
2044                                                <fo:table-row>
2045                                                        <fo:table-cell>
2046                                                                <fo:block> </fo:block>
2047                                                        </fo:table-cell>
2048                                                </fo:table-row>
2049                                                <fo:table-row>
2050                                                        <fo:table-cell>
2051                                                                <fo:block><fo:table table-layout="fixed" width="100%" border-collapse="collapse">
2052                                                                                <fo:table-column column-width="12.500" column-number="1"/>
2053                                                                                <fo:table-column column-width="12.500" column-number="2"/>
2054                                                                                <fo:table-column column-width="12.500" column-number="3"/>
2055                                                                                <fo:table-column column-width="12.500" column-number="4"/>
2056                                                                                <fo:table-column column-width="12.500" column-number="5"/>
2057                                                                                <fo:table-column column-width="12.500" column-number="6"/><fo:table-column column-width="12.500" column-number="7"/><fo:table-column column-width="12.500" column-number="8"/>
2058                                                                                <fo:table-body>
2059                                                                                        <fo:table-row font-weight="bold">
2060                                                                                                <fo:table-cell>
2061                                                                                                        <fo:block>
2062                                                                                                                <fo:basic-link external-destination="url({$url_runNumber})">Run no</fo:basic-link>
2063                                                                                                        </fo:block>
2064                                                                                                </fo:table-cell>
2065                                                                                                <fo:table-cell>
2066                                                                                                        <fo:block>
2067                                                                                                                <fo:basic-link external-destination="url({$url_mdTop})">Depth Top</fo:basic-link>
2068                                                                                                        </fo:block>
2069                                                                                                        <fo:block>mMD</fo:block>
2070                                                                                                </fo:table-cell>
2071                                                                                                <fo:table-cell>
2072                                                                                                        <fo:block>
2073                                                                                                                <fo:basic-link external-destination="url({$url_mdBottom})">Depth Bottom</fo:basic-link>
2074                                                                                                        </fo:block>
2075                                                                                                        <fo:block>mMD</fo:block>
2076                                                                                                </fo:table-cell>
2077                                                                                                <fo:table-cell>
2078                                                                                                        <fo:block>
2079                                                                                                                <fo:basic-link external-destination="url({$url_tool})">Tool</fo:basic-link>
2080                                                                                                        </fo:block>
2081                                                                                                </fo:table-cell>
2082                                                                                                <fo:table-cell>
2083                                                                                                        <fo:block>
2084                                                                                                                <fo:basic-link external-destination="url({$url_tempBHCT})">BHCT</fo:basic-link>
2085                                                                                                        </fo:block>
2086                                                                                                        <fo:block>
2087                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:logInfo/witsml:tempBHCT/@uom)"><fo:inline>
2088<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:logInfo/witsml:tempBHCT/@uom"/>
2089</fo:inline></xsl:if>
2090                                                                                                        </fo:block>
2091                                                                                                </fo:table-cell>
2092                                                                                                <fo:table-cell>
2093                                                                                                        <fo:block>
2094                                                                                                                <fo:basic-link external-destination="url({$url_tempBHST})">BHST</fo:basic-link>
2095                                                                                                        </fo:block>
2096                                                                                                        <fo:block>
2097                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:logInfo/witsml:tempBHST/@uom)"><fo:inline>
2098<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:logInfo/witsml:tempBHST/@uom"/>
2099</fo:inline></xsl:if>
2100                                                                                                        </fo:block>
2101                                                                                                </fo:table-cell><fo:table-cell>
2102                                                                                                        <fo:block> </fo:block>
2103                                                                                                       
2104                                                                                                </fo:table-cell><fo:table-cell>
2105                                                                                                        <fo:block> </fo:block>
2106                                                                                                       
2107                                                                                                </fo:table-cell>
2108                                                                                        </fo:table-row>
2109                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:logInfo">
2110<fo:table-row>
2111                                                                                                <fo:table-cell>
2112                                                                                                        <fo:block>
2113                                                                                                                <xsl:if test="string(witsml:runNumber)"><fo:inline>
2114<xsl:value-of select="witsml:runNumber"/>
2115</fo:inline></xsl:if>
2116                                                                                                        </fo:block>
2117                                                                                                </fo:table-cell>
2118                                                                                                <fo:table-cell>
2119                                                                                                        <fo:block>
2120                                                                                                                <xsl:if test="string(witsml:mdTop)"><fo:inline>
2121<xsl:value-of select="witsml:mdTop"/>
2122</fo:inline></xsl:if>
2123                                                                                                        </fo:block>
2124                                                                                                </fo:table-cell>
2125                                                                                                <fo:table-cell>
2126                                                                                                        <fo:block>
2127                                                                                                                <xsl:if test="string(witsml:mdBottom)"><fo:inline>
2128<xsl:value-of select="witsml:mdBottom"/>
2129</fo:inline></xsl:if>
2130                                                                                                        </fo:block>
2131                                                                                                </fo:table-cell>
2132                                                                                                <fo:table-cell>
2133                                                                                                        <fo:block>
2134                                                                                                                <xsl:if test="string(witsml:tool)"><fo:inline>
2135<xsl:value-of select="witsml:tool"/>
2136</fo:inline></xsl:if>
2137                                                                                                        </fo:block>
2138                                                                                                </fo:table-cell>
2139                                                                                                <fo:table-cell>
2140                                                                                                        <fo:block>
2141                                                                                                                <xsl:if test="string(witsml:tempBHCT)"><fo:inline>
2142<xsl:value-of select="witsml:tempBHCT"/>
2143</fo:inline></xsl:if>
2144                                                                                                        </fo:block>
2145                                                                                                </fo:table-cell>
2146                                                                                                <fo:table-cell>
2147                                                                                                        <fo:block>
2148                                                                                                                <xsl:if test="string(witsml:tempBHST)"><fo:inline>
2149<xsl:value-of select="witsml:tempBHST"/>
2150</fo:inline></xsl:if>
2151                                                                                                        </fo:block>
2152                                                                                                </fo:table-cell><fo:table-cell>
2153                                                                                                        <fo:block> </fo:block>
2154                                                                                                </fo:table-cell><fo:table-cell>
2155                                                                                                        <fo:block> </fo:block>
2156                                                                                                </fo:table-cell>
2157                                                                                        </fo:table-row>
2158</xsl:for-each>
2159                                                                                </fo:table-body>
2160                                                                        </fo:table> </fo:block>
2161                                                        </fo:table-cell>
2162                                                </fo:table-row>
2163                                        </fo:table-body>
2164                                </fo:table>
2165                        </fo:block>
2166<xslt:comment> Core Information </xslt:comment>
2167                        <fo:block>
2168                                <xsl:variable name="element_drillReportCoreInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportCoreInfo']/xsd:sequence"/>
2169                                <xsl:variable name="url_coreNumber">
2170                                        <xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='coreNumber']/@sawsdl:modelReference"/>
2171                                </xsl:variable>
2172                                <xsl:variable name="url_mdTop">
2173                                        <xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
2174                                </xsl:variable>
2175                                <xsl:variable name="url_mdBottom">
2176                                        <xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='mdBottom']/@sawsdl:modelReference"/>
2177                                </xsl:variable>
2178                                <xsl:variable name="url_lenRecovered">
2179                                        <xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='lenRecovered']/@sawsdl:modelReference"/>
2180                                </xsl:variable>
2181                                <xsl:variable name="url_recoverPc">
2182                                        <xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='recoverPc']/@sawsdl:modelReference"/>
2183                                </xsl:variable>
2184                                <xsl:variable name="url_lenBarrel">
2185                                        <xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='lenBarrel']/@sawsdl:modelReference"/>
2186                                </xsl:variable>
2187                                <xsl:variable name="url_innerBarrelType">
2188                                        <xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='innerBarrelType']/@sawsdl:modelReference"/>
2189                                </xsl:variable>
2190                                <xsl:variable name="url_coreDescription">
2191                                        <xsl:value-of select="$element_drillReportCoreInfo//xsd:element[@name='coreDescription']/@sawsdl:modelReference"/>
2192                                </xsl:variable>
2193                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
2194                                <fo:leader/>
2195                                <fo:table>
2196                                        <fo:table-column column-width="100%"/>
2197                                        <fo:table-body>
2198                                                <fo:table-row font-weight="bold" font-size="14pt">
2199                                                        <fo:table-cell>
2200                                                                <fo:block>
2201                                                                        Core Information
2202                                                                </fo:block>
2203                                                        </fo:table-cell>
2204                                                </fo:table-row>
2205                                                <fo:table-row>
2206                                                        <fo:table-cell>
2207                                                                <fo:block> </fo:block>
2208                                                        </fo:table-cell>
2209                                                </fo:table-row>
2210                                                <fo:table-row>
2211                                                        <fo:table-cell>
2212                                                                <fo:block><fo:table table-layout="fixed" width="100%" border-collapse="collapse">
2213                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="1"/>
2214                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="2"/>
2215                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="3"/>
2216                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="4"/>
2217                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="5"/>
2218                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="6"/>
2219                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="7"/>
2220                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="8"/>
2221                                                                                <fo:table-body>
2222                                                                                        <fo:table-row font-weight="bold">
2223                                                                                                <fo:table-cell>
2224                                                                                                        <fo:block>
2225                                                                                                                <fo:basic-link external-destination="url({$url_coreNumber})">Core no</fo:basic-link>
2226                                                                                                        </fo:block>
2227                                                                                                </fo:table-cell>
2228                                                                                                <fo:table-cell>
2229                                                                                                        <fo:block>
2230                                                                                                                <fo:basic-link external-destination="url({$url_mdTop})">Depth Top</fo:basic-link>
2231                                                                                                        </fo:block>
2232                                                                                                        <fo:block>mMD</fo:block>
2233                                                                                                </fo:table-cell>
2234                                                                                                <fo:table-cell>
2235                                                                                                        <fo:block>
2236                                                                                                                <fo:basic-link external-destination="url({$url_mdBottom})">Depth Bottom</fo:basic-link>
2237                                                                                                        </fo:block>
2238                                                                                                        <fo:block>mMD</fo:block>
2239                                                                                                </fo:table-cell>
2240                                                                                                <fo:table-cell>
2241                                                                                                        <fo:block>
2242                                                                                                                <fo:basic-link external-destination="url({$url_lenRecovered})">Core length</fo:basic-link>
2243                                                                                                        </fo:block>
2244                                                                                                        <fo:block>
2245                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:coreInfo/witsml:lenRecovered/@uom)"><fo:inline>
2246<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:coreInfo/witsml:lenRecovered/@uom"/>
2247</fo:inline></xsl:if>
2248                                                                                                        </fo:block>
2249                                                                                                </fo:table-cell>
2250                                                                                                <fo:table-cell>
2251                                                                                                        <fo:block>
2252                                                                                                                <fo:basic-link external-destination="url({$url_recoverPc})">Recover core</fo:basic-link>
2253                                                                                                        </fo:block>
2254                                                                                                        <fo:block>
2255                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:coreInfo/witsml:recoverPc/@uom)"><fo:inline>
2256<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:coreInfo/witsml:recoverPc/@uom"/>
2257</fo:inline></xsl:if>
2258                                                                                                        </fo:block>
2259                                                                                                </fo:table-cell>
2260                                                                                                <fo:table-cell>
2261                                                                                                        <fo:block>
2262                                                                                                                <fo:basic-link external-destination="url({$url_lenBarrel})">Core barrel length</fo:basic-link>
2263                                                                                                        </fo:block>
2264                                                                                                        <fo:block>
2265                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:coreInfo/witsml:lenBarrel/@uom)"><fo:inline>
2266<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:coreInfo/witsml:lenBarrel/@uom"/>
2267</fo:inline></xsl:if>
2268                                                                                                        </fo:block>
2269                                                                                                </fo:table-cell>
2270                                                                                                <fo:table-cell>
2271                                                                                                        <fo:block>
2272                                                                                                                <fo:basic-link external-destination="url({$url_innerBarrelType})">Inner barrel type</fo:basic-link>
2273                                                                                                        </fo:block>
2274                                                                                                </fo:table-cell>
2275                                                                                                <fo:table-cell>
2276                                                                                                        <fo:block>
2277                                                                                                                <fo:basic-link external-destination="url({$url_coreDescription})">Description</fo:basic-link>
2278                                                                                                        </fo:block>
2279                                                                                                </fo:table-cell>
2280                                                                                        </fo:table-row>
2281                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:coreInfo">
2282<fo:table-row>
2283                                                                                                <fo:table-cell>
2284                                                                                                        <fo:block>
2285                                                                                                                <xsl:if test="string(witsml:coreNumber)"><fo:inline>
2286<xsl:value-of select="witsml:coreNumber"/>
2287</fo:inline></xsl:if>
2288                                                                                                        </fo:block>
2289                                                                                                </fo:table-cell>
2290                                                                                                <fo:table-cell>
2291                                                                                                        <fo:block>
2292                                                                                                                <xsl:if test="string(witsml:mdTop)"><fo:inline>
2293<xsl:value-of select="witsml:mdTop"/>
2294</fo:inline></xsl:if>
2295                                                                                                        </fo:block>
2296                                                                                                </fo:table-cell>
2297                                                                                                <fo:table-cell>
2298                                                                                                        <fo:block>
2299                                                                                                                <xsl:if test="string(witsml:mdBottom)"><fo:inline>
2300<xsl:value-of select="witsml:mdBottom"/>
2301</fo:inline></xsl:if>
2302                                                                                                        </fo:block>
2303                                                                                                </fo:table-cell>
2304                                                                                                <fo:table-cell>
2305                                                                                                        <fo:block>
2306                                                                                                                <xsl:if test="string(witsml:lenRecovered)"><fo:inline>
2307<xsl:value-of select="witsml:lenRecovered"/>
2308</fo:inline></xsl:if>
2309                                                                                                        </fo:block>
2310                                                                                                </fo:table-cell>
2311                                                                                                <fo:table-cell>
2312                                                                                                        <fo:block>
2313                                                                                                                <xsl:if test="string(witsml:recoverPc)"><fo:inline>
2314<xsl:value-of select="witsml:recoverPc"/>
2315</fo:inline></xsl:if>
2316                                                                                                        </fo:block>
2317                                                                                                </fo:table-cell>
2318                                                                                                <fo:table-cell>
2319                                                                                                        <fo:block>
2320                                                                                                                <xsl:if test="string(witsml:lenBarrel)"><fo:inline>
2321<xsl:value-of select="witsml:lenBarrel"/>
2322</fo:inline></xsl:if>
2323                                                                                                        </fo:block>
2324                                                                                                </fo:table-cell>
2325                                                                                                <fo:table-cell>
2326                                                                                                        <fo:block>
2327                                                                                                                <xsl:if test="string(witsml:innerBarrelType)"><fo:inline>
2328<xsl:value-of select="witsml:innerBarrelType"/>
2329</fo:inline></xsl:if>
2330                                                                                                        </fo:block>
2331                                                                                                </fo:table-cell>
2332                                                                                                <fo:table-cell>
2333                                                                                                        <fo:block>
2334                                                                                                                <xsl:if test="string(witsml:coreDescription)"><fo:inline>
2335<xsl:value-of select="witsml:coreDescription"/>
2336</fo:inline></xsl:if>
2337                                                                                                        </fo:block>
2338                                                                                                </fo:table-cell>
2339                                                                                        </fo:table-row>
2340</xsl:for-each>
2341                                                                                </fo:table-body>
2342                                                                        </fo:table> </fo:block>
2343                                                        </fo:table-cell>
2344                                                </fo:table-row>
2345                                        </fo:table-body>
2346                                </fo:table>
2347                        </fo:block>
2348<xslt:comment> Well Test Information </xslt:comment>
2349                        <fo:block break-before="page">
2350                                <xsl:variable name="element_drillReportWellTestInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportWellTestInfo']/xsd:sequence"/>
2351                                <xsl:variable name="url_dTim">
2352                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='dTim']/@sawsdl:modelReference"/>
2353                                </xsl:variable>
2354                                <xsl:variable name="url_testNumber">
2355                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='testNumber']/@sawsdl:modelReference"/>
2356                                </xsl:variable>
2357                                <xsl:variable name="url_testType">
2358                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='testType']/@sawsdl:modelReference"/>
2359                                </xsl:variable>
2360                                <xsl:variable name="url_mdTop">
2361                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
2362                                </xsl:variable>
2363                                <xsl:variable name="url_mdBottom">
2364                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='mdBottom']/@sawsdl:modelReference"/>
2365                                </xsl:variable>
2366                                <xsl:variable name="url_chokeOrificeSize">
2367                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='chokeOrificeSize']/@sawsdl:modelReference"/>
2368                                </xsl:variable>
2369                                <xsl:variable name="url_densityOil">
2370                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='densityOil']/@sawsdl:modelReference"/>
2371                                </xsl:variable>
2372                                <xsl:variable name="url_flowRateOil">
2373                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='flowRateOil']/@sawsdl:modelReference"/>
2374                                </xsl:variable>
2375                                <xsl:variable name="url_flowRateGas">
2376                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='flowRateGas']/@sawsdl:modelReference"/>
2377                                </xsl:variable>
2378                                <xsl:variable name="url_flowRateWater">
2379                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='flowRateWater']/@sawsdl:modelReference"/>
2380                                </xsl:variable>
2381                                <xsl:variable name="url_presShutIn">
2382                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='presShutIn']/@sawsdl:modelReference"/>
2383                                </xsl:variable>
2384                                <xsl:variable name="url_presFlowing">
2385                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='presFlowing']/@sawsdl:modelReference"/>
2386                                </xsl:variable>
2387                                <xsl:variable name="url_presBottom">
2388                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='presBottom']/@sawsdl:modelReference"/>
2389                                </xsl:variable>
2390                                <xsl:variable name="url_gasOilRatio">
2391                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='gasOilRatio']/@sawsdl:modelReference"/>
2392                                </xsl:variable>
2393                                <xsl:variable name="url_waterOilRatio">
2394                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='waterOilRatio']/@sawsdl:modelReference"/>
2395                                </xsl:variable>
2396                                <xsl:variable name="url_chloride">
2397                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='chloride']/@sawsdl:modelReference"/>
2398                                </xsl:variable>
2399                                <xsl:variable name="url_carbonDioxide">
2400                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='carbonDioxide']/@sawsdl:modelReference"/>
2401                                </xsl:variable>
2402                                <xsl:variable name="url_hydrogenSulfide">
2403                                        <xsl:value-of select="$element_drillReportWellTestInfo//xsd:element[@name='hydrogenSulfide']/@sawsdl:modelReference"/>
2404                                </xsl:variable>
2405                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
2406                                <fo:leader/>
2407                                <fo:table>
2408                                        <fo:table-column column-width="100%"/>
2409                                        <fo:table-body>
2410                                                <fo:table-row font-weight="bold" font-size="14pt">
2411                                                        <fo:table-cell>
2412                                                                <fo:block>
2413                                                                        Well Test Information
2414                                                                </fo:block>
2415                                                        </fo:table-cell>
2416                                                </fo:table-row>
2417                                                <fo:table-row>
2418                                                        <fo:table-cell>
2419                                                                <fo:block> </fo:block>
2420                                                        </fo:table-cell>
2421                                                </fo:table-row>
2422                                                <fo:table-row>
2423                                                        <fo:table-cell>
2424                                                                <fo:block><fo:table table-layout="fixed" width="100%" border-collapse="collapse">
2425                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="1"/>
2426                                                                                <fo:table-column column-width="proportional-column-width(3.755)" column-number="2"/>
2427                                                                                <fo:table-column column-width="proportional-column-width(7.356)" column-number="3"/>
2428                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="4"/>
2429                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="5"/>
2430                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="6"/>
2431                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="7"/>
2432                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="8"/>
2433                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="9"/>
2434                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="10"/>
2435                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="11"/>
2436                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="12"/>
2437                                                                                <fo:table-column column-width="proportional-column-width(6.256)" column-number="13"/>
2438                                                                                <fo:table-column column-width="proportional-column-width(4.855)" column-number="14"/>
2439                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="15"/>
2440                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="16"/>
2441                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="17"/>
2442                                                                                <fo:table-column column-width="proportional-column-width(5.556)" column-number="18"/>
2443                                                                                <fo:table-body>
2444                                                                                        <fo:table-row font-weight="bold">
2445                                                                                                <fo:table-cell>
2446                                                                                                        <fo:block>
2447                                                                                                                <fo:basic-link external-destination="url({$url_dTim})">Time</fo:basic-link>
2448                                                                                                        </fo:block>
2449                                                                                                </fo:table-cell>
2450                                                                                                <fo:table-cell>
2451                                                                                                        <fo:block>
2452                                                                                                                <fo:basic-link external-destination="url({$url_testNumber})">Test no</fo:basic-link>
2453                                                                                                        </fo:block>
2454                                                                                                </fo:table-cell>
2455                                                                                                <fo:table-cell>
2456                                                                                                        <fo:block>
2457                                                                                                                <fo:basic-link external-destination="url({$url_testType})">Type</fo:basic-link>
2458                                                                                                        </fo:block>
2459                                                                                                </fo:table-cell>
2460                                                                                                <fo:table-cell>
2461                                                                                                        <fo:block>
2462                                                                                                                <fo:basic-link external-destination="url({$url_mdTop})">Depth Top</fo:basic-link>
2463                                                                                                        </fo:block>
2464                                                                                                        <fo:block>mMD</fo:block>
2465                                                                                                </fo:table-cell>
2466                                                                                                <fo:table-cell>
2467                                                                                                        <fo:block>
2468                                                                                                                <fo:basic-link external-destination="url({$url_mdBottom})">Depth Bottom</fo:basic-link>
2469                                                                                                        </fo:block>
2470                                                                                                        <fo:block>mMD</fo:block>
2471                                                                                                </fo:table-cell>
2472                                                                                                <fo:table-cell>
2473                                                                                                        <fo:block>
2474                                                                                                                <fo:basic-link external-destination="url({$url_chokeOrificeSize})">Choke orifice Size</fo:basic-link>
2475                                                                                                        </fo:block>
2476                                                                                                        <fo:block>
2477                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:chokeOrificeSize/@uom)"><fo:inline>
2478<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:chokeOrificeSize/@uom"/>
2479</fo:inline></xsl:if>
2480                                                                                                        </fo:block>
2481                                                                                                </fo:table-cell>
2482                                                                                                <fo:table-cell>
2483                                                                                                        <fo:block>
2484                                                                                                                <fo:basic-link external-destination="url({$url_densityOil})">Density crude oil</fo:basic-link>
2485                                                                                                        </fo:block>
2486                                                                                                        <fo:block>
2487                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:densityOil/@uom)"><fo:inline>
2488<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:densityOil/@uom"/>
2489</fo:inline></xsl:if>
2490                                                                                                        </fo:block>
2491                                                                                                </fo:table-cell>
2492                                                                                                <fo:table-cell>
2493                                                                                                        <fo:block>
2494                                                                                                                <fo:basic-link external-destination="url({$url_flowRateOil})">Oil flow rate</fo:basic-link>
2495                                                                                                        </fo:block>
2496                                                                                                        <fo:block>
2497                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:flowRateOil/@uom)"><fo:inline>
2498<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:flowRateOil/@uom"/>
2499</fo:inline></xsl:if>
2500                                                                                                        </fo:block>
2501                                                                                                </fo:table-cell>
2502                                                                                                <fo:table-cell>
2503                                                                                                        <fo:block>
2504                                                                                                                <fo:basic-link external-destination="url({$url_flowRateGas})">Gas flow rate M</fo:basic-link>
2505                                                                                                        </fo:block>
2506                                                                                                        <fo:block>
2507                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:flowRateGas/@uom)"><fo:inline>
2508<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:flowRateGas/@uom"/>
2509</fo:inline></xsl:if>
2510                                                                                                        </fo:block>
2511                                                                                                </fo:table-cell>
2512                                                                                                <fo:table-cell>
2513                                                                                                        <fo:block>
2514                                                                                                                <fo:basic-link external-destination="url({$url_flowRateWater})">Water flow rate</fo:basic-link>
2515                                                                                                        </fo:block>
2516                                                                                                        <fo:block>
2517                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:flowRateWater/@uom)"><fo:inline>
2518<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:flowRateWater/@uom"/>
2519</fo:inline></xsl:if>
2520                                                                                                        </fo:block>
2521                                                                                                </fo:table-cell>
2522                                                                                                <fo:table-cell>
2523                                                                                                        <fo:block>
2524                                                                                                                <fo:basic-link external-destination="url({$url_presShutIn})">Shut in pressure</fo:basic-link>
2525                                                                                                        </fo:block>
2526                                                                                                        <fo:block>
2527                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:presShutIn/@uom)"><fo:inline>
2528<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:presShutIn/@uom"/>
2529</fo:inline></xsl:if>
2530                                                                                                        </fo:block>
2531                                                                                                </fo:table-cell>
2532                                                                                                <fo:table-cell>
2533                                                                                                        <fo:block>
2534                                                                                                                <fo:basic-link external-destination="url({$url_presFlowing})">Flow pressure</fo:basic-link>
2535                                                                                                        </fo:block>
2536                                                                                                        <fo:block>
2537                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:presFlowing/@uom)"><fo:inline>
2538<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:presFlowing/@uom"/>
2539</fo:inline></xsl:if>
2540                                                                                                        </fo:block>
2541                                                                                                </fo:table-cell>
2542                                                                                                <fo:table-cell>
2543                                                                                                        <fo:block>
2544                                                                                                                <fo:basic-link external-destination="url({$url_presBottom})">Bottom hole pressure</fo:basic-link>
2545                                                                                                        </fo:block>
2546                                                                                                        <fo:block>
2547                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:presBottom/@uom)"><fo:inline>
2548<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:presBottom/@uom"/>
2549</fo:inline></xsl:if>
2550                                                                                                        </fo:block>
2551                                                                                                </fo:table-cell>
2552                                                                                                <fo:table-cell>
2553                                                                                                        <fo:block>
2554                                                                                                                <fo:basic-link external-destination="url({$url_gasOilRatio})">Gas oil ratio</fo:basic-link>
2555                                                                                                        </fo:block>
2556                                                                                                        <fo:block>
2557                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:gasOilRatio/@uom)"><fo:inline>
2558<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:gasOilRatio/@uom"/>
2559</fo:inline></xsl:if>
2560                                                                                                        </fo:block>
2561                                                                                                </fo:table-cell>
2562                                                                                                <fo:table-cell>
2563                                                                                                        <fo:block>
2564                                                                                                                <fo:basic-link external-destination="url({$url_waterOilRatio})">Water oil ratio</fo:basic-link>
2565                                                                                                        </fo:block>
2566                                                                                                        <fo:block>
2567                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:waterOilRatio/@uom)"><fo:inline>
2568<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:waterOilRatio/@uom"/>
2569</fo:inline></xsl:if>
2570                                                                                                        </fo:block>
2571                                                                                                </fo:table-cell>
2572                                                                                                <fo:table-cell>
2573                                                                                                        <fo:block>
2574                                                                                                                <fo:basic-link external-destination="url({$url_chloride})">Chloride content</fo:basic-link>
2575                                                                                                        </fo:block>
2576                                                                                                        <fo:block>
2577                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:chloride/@uom)"><fo:inline>
2578<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:chloride/@uom"/>
2579</fo:inline></xsl:if>
2580                                                                                                        </fo:block>
2581                                                                                                </fo:table-cell>
2582                                                                                                <fo:table-cell>
2583                                                                                                        <fo:block>
2584                                                                                                                <fo:basic-link external-destination="url({$url_carbonDioxide})">CO2 content</fo:basic-link>
2585                                                                                                        </fo:block>
2586                                                                                                        <fo:block>
2587                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:carbonDioxide/@uom)"><fo:inline>
2588<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:carbonDioxide/@uom"/>
2589</fo:inline></xsl:if>
2590                                                                                                        </fo:block>
2591                                                                                                </fo:table-cell>
2592                                                                                                <fo:table-cell>
2593                                                                                                        <fo:block>
2594                                                                                                                <fo:basic-link external-destination="url({$url_hydrogenSulfide})">H2S content</fo:basic-link>
2595                                                                                                        </fo:block>
2596                                                                                                        <fo:block>
2597                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:hydrogenSulfide/@uom)"><fo:inline>
2598<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo/witsml:hydrogenSulfide/@uom"/>
2599</fo:inline></xsl:if>
2600                                                                                                        </fo:block>
2601                                                                                                </fo:table-cell>
2602                                                                                        </fo:table-row>
2603                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:wellTestInfo">
2604<fo:table-row>
2605                                                                                                <fo:table-cell>
2606                                                                                                        <fo:block>
2607                                                                                                                <xsl:if test="string(substring-after(substring(witsml:dTim, 0, 17), 'T'))"><fo:inline>
2608<xsl:value-of select="substring-after(substring(witsml:dTim, 0, 17), 'T')"/>
2609</fo:inline></xsl:if>
2610                                                                                                        </fo:block>
2611                                                                                                </fo:table-cell>
2612                                                                                                <fo:table-cell>
2613                                                                                                        <fo:block>
2614                                                                                                                <xsl:if test="string(witsml:testNumber)"><fo:inline>
2615<xsl:value-of select="witsml:testNumber"/>
2616</fo:inline></xsl:if>
2617                                                                                                        </fo:block>
2618                                                                                                </fo:table-cell>
2619                                                                                                <fo:table-cell>
2620                                                                                                        <fo:block>
2621                                                                                                                <xsl:if test="string(witsml:testType)"><fo:inline>
2622<xsl:value-of select="witsml:testType"/>
2623</fo:inline></xsl:if>
2624                                                                                                        </fo:block>
2625                                                                                                </fo:table-cell>
2626                                                                                                <fo:table-cell>
2627                                                                                                        <fo:block>
2628                                                                                                                <xsl:if test="string(witsml:mdTop)"><fo:inline>
2629<xsl:value-of select="witsml:mdTop"/>
2630</fo:inline></xsl:if>
2631                                                                                                        </fo:block>
2632                                                                                                </fo:table-cell>
2633                                                                                                <fo:table-cell>
2634                                                                                                        <fo:block>
2635                                                                                                                <xsl:if test="string(witsml:mdBottom)"><fo:inline>
2636<xsl:value-of select="witsml:mdBottom"/>
2637</fo:inline></xsl:if>
2638                                                                                                        </fo:block>
2639                                                                                                </fo:table-cell>
2640                                                                                                <fo:table-cell>
2641                                                                                                        <fo:block>
2642                                                                                                                <xsl:if test="string(witsml:chokeOrificeSize)"><fo:inline>
2643<xsl:value-of select="witsml:chokeOrificeSize"/>
2644</fo:inline></xsl:if>
2645                                                                                                        </fo:block>
2646                                                                                                </fo:table-cell>
2647                                                                                                <fo:table-cell>
2648                                                                                                        <fo:block>
2649                                                                                                                <xsl:if test="string(witsml:densityOil)"><fo:inline>
2650<xsl:value-of select="witsml:densityOil"/>
2651</fo:inline></xsl:if>
2652                                                                                                        </fo:block>
2653                                                                                                </fo:table-cell>
2654                                                                                                <fo:table-cell>
2655                                                                                                        <fo:block>
2656                                                                                                                <xsl:if test="string(witsml:flowRateOil)"><fo:inline>
2657<xsl:value-of select="witsml:flowRateOil"/>
2658</fo:inline></xsl:if>
2659                                                                                                        </fo:block>
2660                                                                                                </fo:table-cell>
2661                                                                                                <fo:table-cell>
2662                                                                                                        <fo:block>
2663                                                                                                                <xsl:if test="string(witsml:flowRateGas)"><fo:inline>
2664<xsl:value-of select="witsml:flowRateGas"/>
2665</fo:inline></xsl:if>
2666                                                                                                        </fo:block>
2667                                                                                                </fo:table-cell>
2668                                                                                                <fo:table-cell>
2669                                                                                                        <fo:block>
2670                                                                                                                <xsl:if test="string(witsml:flowRateWater)"><fo:inline>
2671<xsl:value-of select="witsml:flowRateWater"/>
2672</fo:inline></xsl:if>
2673                                                                                                        </fo:block>
2674                                                                                                </fo:table-cell>
2675                                                                                                <fo:table-cell>
2676                                                                                                        <fo:block>
2677                                                                                                                <xsl:if test="string(witsml:presShutIn)"><fo:inline>
2678<xsl:value-of select="witsml:presShutIn"/>
2679</fo:inline></xsl:if>
2680                                                                                                        </fo:block>
2681                                                                                                </fo:table-cell>
2682                                                                                                <fo:table-cell>
2683                                                                                                        <fo:block>
2684                                                                                                                <xsl:if test="string(witsml:presFlowing)"><fo:inline>
2685<xsl:value-of select="witsml:presFlowing"/>
2686</fo:inline></xsl:if>
2687                                                                                                        </fo:block>
2688                                                                                                </fo:table-cell>
2689                                                                                                <fo:table-cell>
2690                                                                                                        <fo:block>
2691                                                                                                                <xsl:if test="string(witsml:presBottom)"><fo:inline>
2692<xsl:value-of select="witsml:presBottom"/>
2693</fo:inline></xsl:if>
2694                                                                                                        </fo:block>
2695                                                                                                </fo:table-cell>
2696                                                                                                <fo:table-cell>
2697                                                                                                        <fo:block>
2698                                                                                                                <xsl:if test="string(witsml:gasOilRatio)"><fo:inline>
2699<xsl:value-of select="witsml:gasOilRatio"/>
2700</fo:inline></xsl:if>
2701                                                                                                        </fo:block>
2702                                                                                                </fo:table-cell>
2703                                                                                                <fo:table-cell>
2704                                                                                                        <fo:block>
2705                                                                                                                <xsl:if test="string(witsml:waterOilRatio)"><fo:inline>
2706<xsl:value-of select="witsml:waterOilRatio"/>
2707</fo:inline></xsl:if>
2708                                                                                                        </fo:block>
2709                                                                                                </fo:table-cell>
2710                                                                                                <fo:table-cell>
2711                                                                                                        <fo:block>
2712                                                                                                                <xsl:if test="string(witsml:chloride)"><fo:inline>
2713<xsl:value-of select="witsml:chloride"/>
2714</fo:inline></xsl:if>
2715                                                                                                        </fo:block>
2716                                                                                                </fo:table-cell>
2717                                                                                                <fo:table-cell>
2718                                                                                                        <fo:block>
2719                                                                                                                <xsl:if test="string(witsml:carbonDioxide)"><fo:inline>
2720<xsl:value-of select="witsml:carbonDioxide"/>
2721</fo:inline></xsl:if>
2722                                                                                                        </fo:block>
2723                                                                                                </fo:table-cell>
2724                                                                                                <fo:table-cell>
2725                                                                                                        <fo:block>
2726                                                                                                                <xsl:if test="string(witsml:hydrogenSulfide)"><fo:inline>
2727<xsl:value-of select="witsml:hydrogenSulfide"/>
2728</fo:inline></xsl:if>
2729                                                                                                        </fo:block>
2730                                                                                                </fo:table-cell>
2731                                                                                        </fo:table-row>
2732</xsl:for-each>
2733                                                                                </fo:table-body>
2734                                                                        </fo:table> </fo:block>
2735                                                        </fo:table-cell>
2736                                                </fo:table-row>
2737                                        </fo:table-body>
2738                                </fo:table>
2739                        </fo:block>
2740<xslt:comment> Formation Test </xslt:comment>
2741                        <fo:block>
2742                                <xsl:variable name="element_drillReportFormTestInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportFormTestInfo']/xsd:sequence"/>
2743                                <xsl:variable name="url_md">
2744                                        <xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='md']/@sawsdl:modelReference"/>
2745                                </xsl:variable>
2746                                <xsl:variable name="url_presPore">
2747                                        <xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='presPore']/@sawsdl:modelReference"/>
2748                                </xsl:variable>
2749                                <xsl:variable name="url_goodSealm">
2750                                        <xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='goodSeal']/@sawsdl:modelReference"/>
2751                                </xsl:variable>
2752                                <xsl:variable name="url_mdSample">
2753                                        <xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='mdSample']/@sawsdl:modelReference"/>
2754                                </xsl:variable>
2755                                <xsl:variable name="url_dominateComponent">
2756                                        <xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='dominateComponent']/@sawsdl:modelReference"/>
2757                                </xsl:variable>
2758                                <xsl:variable name="url_densityHC">
2759                                        <xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='densityHC']/@sawsdl:modelReference"/>
2760                                </xsl:variable>
2761                                <xsl:variable name="url_volumeSample">
2762                                        <xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='volumeSample']/@sawsdl:modelReference"/>
2763                                </xsl:variable>
2764                                <xsl:variable name="url_description">
2765                                        <xsl:value-of select="$element_drillReportFormTestInfo//xsd:element[@name='description']/@sawsdl:modelReference"/>
2766                                </xsl:variable>
2767                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
2768                                <fo:leader/>
2769                                <fo:table>
2770                                        <fo:table-column column-width="100%"/>
2771                                        <fo:table-body>
2772                                                <fo:table-row font-weight="bold" font-size="14pt">
2773                                                        <fo:table-cell>
2774                                                                <fo:block>
2775                                                                        Formation Test
2776                                                                </fo:block>
2777                                                        </fo:table-cell>
2778                                                </fo:table-row>
2779                                                <fo:table-row>
2780                                                        <fo:table-cell>
2781                                                                <fo:block> </fo:block>
2782                                                        </fo:table-cell>
2783                                                </fo:table-row>
2784                                                <fo:table-row>
2785                                                        <fo:table-cell>
2786                                                                <fo:block><fo:table table-layout="fixed" width="100%" border-collapse="collapse">
2787                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="1"/>
2788                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="2"/>
2789                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="3"/>
2790                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="4"/>
2791                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="5"/>
2792                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="6"/>
2793                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="7"/>
2794                                                                                <fo:table-column column-width="proportional-column-width(12.5)" column-number="8"/>
2795                                                                                <fo:table-body>
2796                                                                                        <fo:table-row font-weight="bold">
2797                                                                                                <fo:table-cell>
2798                                                                                                        <fo:block>
2799                                                                                                                <fo:basic-link external-destination="url({$url_md})">Depth</fo:basic-link>
2800                                                                                                        </fo:block>
2801                                                                                                        <fo:block>mMD</fo:block>
2802                                                                                                </fo:table-cell>
2803                                                                                                <fo:table-cell>
2804                                                                                                        <fo:block>
2805                                                                                                                <fo:basic-link external-destination="url({$url_presPore})">Formation pore pressure</fo:basic-link>
2806                                                                                                        </fo:block>
2807                                                                                                        <fo:block>
2808                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:formTestInfo/witsml:presPore/@uom)"><fo:inline>
2809<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:formTestInfo/witsml:presPore/@uom"/>
2810</fo:inline></xsl:if>
2811                                                                                                        </fo:block>
2812                                                                                                </fo:table-cell>
2813                                                                                                <fo:table-cell>
2814                                                                                                        <fo:block>
2815                                                                                                                <fo:basic-link external-destination="url({$url_goodSealm})">Good seal ind</fo:basic-link>
2816                                                                                                        </fo:block>
2817                                                                                                </fo:table-cell>
2818                                                                                                <fo:table-cell>
2819                                                                                                        <fo:block>
2820                                                                                                                <fo:basic-link external-destination="url({$url_mdSample})">Depth to sample point</fo:basic-link>
2821                                                                                                        </fo:block>
2822                                                                                                        <fo:block>
2823                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:formTestInfo/witsml:mdSample/@uom)"><fo:inline>
2824<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:formTestInfo/witsml:mdSample/@uom"/>
2825</fo:inline></xsl:if>
2826                                                                                                        </fo:block>
2827                                                                                                </fo:table-cell>
2828                                                                                                <fo:table-cell>
2829                                                                                                        <fo:block>
2830                                                                                                                <fo:basic-link external-destination="url({$url_dominateComponent})">Dominate fluid component</fo:basic-link>
2831                                                                                                        </fo:block>
2832                                                                                                </fo:table-cell>
2833                                                                                                <fo:table-cell>
2834                                                                                                        <fo:block>
2835                                                                                                                <fo:basic-link external-destination="url({$url_densityHC})">HC Component density</fo:basic-link>
2836                                                                                                        </fo:block>
2837                                                                                                        <fo:block>
2838                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:formTestInfo/witsml:densityHC/@uom)"><fo:inline>
2839<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:formTestInfo/witsml:densityHC/@uom"/>
2840</fo:inline></xsl:if>
2841                                                                                                        </fo:block>
2842                                                                                                </fo:table-cell>
2843                                                                                                <fo:table-cell>
2844                                                                                                        <fo:block>
2845                                                                                                                <fo:basic-link external-destination="url({$url_volumeSample})">Sample volume</fo:basic-link>
2846                                                                                                        </fo:block>
2847                                                                                                        <fo:block>
2848                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:formTestInfo/witsml:volumeSample/@uom)"><fo:inline>
2849<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:formTestInfo/witsml:volumeSample/@uom"/>
2850</fo:inline></xsl:if>
2851                                                                                                        </fo:block>
2852                                                                                                </fo:table-cell>
2853                                                                                                <fo:table-cell>
2854                                                                                                        <fo:block>
2855                                                                                                                <fo:basic-link external-destination="url({$url_description})">Description</fo:basic-link>
2856                                                                                                        </fo:block>
2857                                                                                                </fo:table-cell>
2858                                                                                        </fo:table-row>
2859                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:formTestInfo">
2860<fo:table-row>
2861                                                                                                <fo:table-cell>
2862                                                                                                        <fo:block>
2863                                                                                                                <xsl:if test="string(witsml:md)"><fo:inline>
2864<xsl:value-of select="witsml:md"/>
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:presPore)"><fo:inline>
2871<xsl:value-of select="witsml:presPore"/>
2872</fo:inline></xsl:if>
2873                                                                                                        </fo:block>
2874                                                                                                </fo:table-cell>
2875                                                                                                <fo:table-cell>
2876                                                                                                        <fo:block>
2877                                                                                                                <xsl:if test="witsml:goodSeal='true' or witsml:goodSeal='1'">yes</xsl:if>
2878                                                                                                                <xsl:if test="witsml:goodSeal='false' or witsml:goodSeal='0'">no</xsl:if>
2879                                                                                                        </fo:block>
2880                                                                                                </fo:table-cell>
2881                                                                                                <fo:table-cell>
2882                                                                                                        <fo:block>
2883                                                                                                                <xsl:if test="string(witsml:mdSample)"><fo:inline>
2884<xsl:value-of select="witsml:mdSample"/>
2885</fo:inline></xsl:if>
2886                                                                                                        </fo:block>
2887                                                                                                </fo:table-cell>
2888                                                                                                <fo:table-cell>
2889                                                                                                        <fo:block>
2890                                                                                                                <xsl:if test="string(witsml:dominateComponent)"><fo:inline>
2891<xsl:value-of select="witsml:dominateComponent"/>
2892</fo:inline></xsl:if>
2893                                                                                                        </fo:block>
2894                                                                                                </fo:table-cell>
2895                                                                                                <fo:table-cell>
2896                                                                                                        <fo:block>
2897                                                                                                                <xsl:if test="string(witsml:densityHC)"><fo:inline>
2898<xsl:value-of select="witsml:densityHC"/>
2899</fo:inline></xsl:if>
2900                                                                                                        </fo:block>
2901                                                                                                </fo:table-cell>
2902                                                                                                <fo:table-cell>
2903                                                                                                        <fo:block>
2904                                                                                                                <xsl:if test="string(witsml:volumeSample)"><fo:inline>
2905<xsl:value-of select="witsml:volumeSample"/>
2906</fo:inline></xsl:if>
2907                                                                                                        </fo:block>
2908                                                                                                </fo:table-cell>
2909                                                                                                <fo:table-cell>
2910                                                                                                        <fo:block>
2911                                                                                                                <xsl:if test="string(witsml:description)"><fo:inline>
2912<xsl:value-of select="witsml:description"/>
2913</fo:inline></xsl:if>
2914                                                                                                        </fo:block>
2915                                                                                                </fo:table-cell>
2916                                                                                        </fo:table-row>
2917</xsl:for-each>
2918                                                                                </fo:table-body>
2919                                                                        </fo:table> </fo:block>
2920                                                        </fo:table-cell>
2921                                                </fo:table-row>
2922                                        </fo:table-body>
2923                                </fo:table>
2924                        </fo:block>
2925<xslt:comment> Stratigraphic Information </xslt:comment>
2926                        <fo:block break-before="page">
2927                                <xsl:variable name="element_drillReportStratInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportStratInfo']/xsd:sequence"/>
2928                                <xsl:variable name="url_mdTop">
2929                                        <xsl:value-of select="$element_drillReportStratInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
2930                                </xsl:variable>
2931                                <xsl:variable name="url_tvdTop">
2932                                        <xsl:value-of select="$element_drillReportStratInfo//xsd:element[@name='tvdTop']/@sawsdl:modelReference"/>
2933                                </xsl:variable>
2934                                <xsl:variable name="url_description">
2935                                        <xsl:value-of select="$element_drillReportStratInfo//xsd:element[@name='description']/@sawsdl:modelReference"/>
2936                                </xsl:variable>
2937                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
2938                                <fo:leader/>
2939                                <fo:table>
2940                                        <fo:table-column column-width="100%"/>
2941                                        <fo:table-body>
2942                                                <fo:table-row font-weight="bold" font-size="14pt">
2943                                                        <fo:table-cell>
2944                                                                <fo:block>
2945                                                                        Stratigraphic Information
2946                                                                </fo:block>
2947                                                        </fo:table-cell>
2948                                                </fo:table-row>
2949                                                <fo:table-row>
2950                                                        <fo:table-cell>
2951                                                                <fo:block> </fo:block>
2952                                                        </fo:table-cell>
2953                                                </fo:table-row>
2954                                                <fo:table-row>
2955                                                        <fo:table-cell>
2956                                                                <fo:block><fo:table table-layout="fixed" width="100%" border-collapse="collapse">
2957                                                                                <fo:table-column column-width="12.500" column-number="1"/>
2958                                                                                <fo:table-column column-width="12.500" column-number="2"/>
2959                                                                                <fo:table-column column-width="12.500" column-number="3"/><fo:table-column column-width="12.500" column-number="4"/><fo:table-column column-width="12.500" column-number="5"/><fo:table-column column-width="12.500" column-number="6"/><fo:table-column column-width="12.500" column-number="7"/><fo:table-column column-width="12.500" column-number="8"/>
2960                                                                                <fo:table-body>
2961                                                                                        <fo:table-row font-weight="bold" height="29.680px" overflow="hidden">
2962                                                                                                <fo:table-cell>
2963                                                                                                        <fo:block>
2964                                                                                                                <fo:basic-link external-destination="url({$url_mdTop})">Depth to top of formation</fo:basic-link>
2965                                                                                                        </fo:block>
2966                                                                                                        <fo:block>mMD</fo:block>
2967                                                                                                </fo:table-cell>
2968                                                                                                <fo:table-cell>
2969                                                                                                        <fo:block>
2970                                                                                                                <fo:basic-link external-destination="url({$url_tvdTop})">Depth to top of formation</fo:basic-link>
2971                                                                                                        </fo:block>
2972                                                                                                        <fo:block>mTVD</fo:block>
2973                                                                                                </fo:table-cell>
2974                                                                                                <fo:table-cell>
2975                                                                                                        <fo:block>
2976                                                                                                                <fo:basic-link external-destination="url({$url_description})">Formation name</fo:basic-link>
2977                                                                                                        </fo:block>
2978                                                                                                </fo:table-cell><fo:table-cell>
2979                                                                                                        <fo:block> </fo:block>
2980                                                                                                </fo:table-cell><fo:table-cell>
2981                                                                                                        <fo:block> </fo:block>
2982                                                                                                </fo:table-cell><fo:table-cell>
2983                                                                                                        <fo:block> </fo:block>
2984                                                                                                </fo:table-cell><fo:table-cell>
2985                                                                                                        <fo:block> </fo:block>
2986                                                                                                </fo:table-cell><fo:table-cell>
2987                                                                                                        <fo:block> </fo:block>
2988                                                                                                </fo:table-cell>
2989                                                                                        </fo:table-row>
2990                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:stratInfo">
2991<fo:table-row>
2992                                                                                                <fo:table-cell>
2993                                                                                                        <fo:block>
2994                                                                                                                <xsl:if test="string(witsml:mdTop)"><fo:inline>
2995<xsl:value-of select="witsml:mdTop"/>
2996</fo:inline></xsl:if>
2997                                                                                                        </fo:block>
2998                                                                                                </fo:table-cell>
2999                                                                                                <fo:table-cell>
3000                                                                                                        <fo:block>
3001                                                                                                                <xsl:if test="string(witsml:tvdTop)"><fo:inline>
3002<xsl:value-of select="witsml:tvdTop"/>
3003</fo:inline></xsl:if>
3004                                                                                                        </fo:block>
3005                                                                                                </fo:table-cell>
3006                                                                                                <fo:table-cell>
3007                                                                                                        <fo:block>
3008                                                                                                                <xsl:if test="string(witsml:description)"><fo:inline>
3009<xsl:value-of select="witsml:description"/>
3010</fo:inline></xsl:if>
3011                                                                                                        </fo:block>
3012                                                                                                </fo:table-cell><fo:table-cell>
3013                                                                                                        <fo:block> </fo:block>
3014                                                                                                </fo:table-cell><fo:table-cell>
3015                                                                                                        <fo:block> </fo:block>
3016                                                                                                </fo:table-cell><fo:table-cell>
3017                                                                                                        <fo:block> </fo:block>
3018                                                                                                </fo:table-cell><fo:table-cell>
3019                                                                                                        <fo:block> </fo:block>
3020                                                                                                </fo:table-cell><fo:table-cell>
3021                                                                                                        <fo:block> </fo:block>
3022                                                                                                </fo:table-cell>
3023                                                                                        </fo:table-row>
3024</xsl:for-each>
3025                                                                                </fo:table-body>
3026                                                                        </fo:table> </fo:block>
3027                                                        </fo:table-cell>
3028                                                </fo:table-row>
3029                                        </fo:table-body>
3030                                </fo:table>
3031                        </fo:block>
3032<xslt:comment> Lithology Information </xslt:comment>
3033                        <fo:block>
3034                                <xsl:variable name="element_drillReportLithShowInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportLithShowInfo']/xsd:sequence"/>
3035                                <xsl:variable name="url_mdTop">
3036                                        <xsl:value-of select="$element_drillReportLithShowInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
3037                                </xsl:variable>
3038                                <xsl:variable name="url_mdBottom">
3039                                        <xsl:value-of select="$element_drillReportLithShowInfo//xsd:element[@name='mdBottom']/@sawsdl:modelReference"/>
3040                                </xsl:variable>
3041                                <xsl:variable name="url_tvdTop">
3042                                        <xsl:value-of select="$element_drillReportLithShowInfo//xsd:element[@name='tvdTop']/@sawsdl:modelReference"/>
3043                                </xsl:variable>
3044                                <xsl:variable name="url_tvdBottom">
3045                                        <xsl:value-of select="$element_drillReportLithShowInfo//xsd:element[@name='tvdBottom']/@sawsdl:modelReference"/>
3046                                </xsl:variable>
3047                                <xsl:variable name="url_show">
3048                                        <xsl:value-of select="$element_drillReportLithShowInfo//xsd:element[@name='show']/@sawsdl:modelReference"/>
3049                                </xsl:variable>
3050                                <xsl:variable name="url_lithology">
3051                                        <xsl:value-of select="$element_drillReportLithShowInfo//xsd:element[@name='lithology']/@sawsdl:modelReference"/>
3052                                </xsl:variable>
3053                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
3054                                <fo:leader/>
3055                                <fo:table>
3056                                        <fo:table-column column-width="100%"/>
3057                                        <fo:table-body>
3058                                                <fo:table-row font-weight="bold" font-size="14pt">
3059                                                        <fo:table-cell>
3060                                                                <fo:block>
3061                                                                        Lithology Information
3062                                                                </fo:block>
3063                                                        </fo:table-cell>
3064                                                </fo:table-row>
3065                                                <fo:table-row>
3066                                                        <fo:table-cell>
3067                                                                <fo:block> </fo:block>
3068                                                        </fo:table-cell>
3069                                                </fo:table-row>
3070                                                <fo:table-row>
3071                                                        <fo:table-cell>
3072                                                                <fo:block><fo:table table-layout="fixed" width="100%" border-collapse="collapse">
3073                                                                                <fo:table-column column-width="proportional-column-width(6.396)" column-number="1"/>
3074                                                                                <fo:table-column column-width="proportional-column-width(6.297)" column-number="2"/>
3075                                                                                <fo:table-column column-width="proportional-column-width(7.698)" column-number="3"/>
3076                                                                                <fo:table-column column-width="proportional-column-width(5.196)" column-number="4"/>
3077                                                                                <fo:table-column column-width="proportional-column-width(5.696)" column-number="5"/>
3078                                                                                <fo:table-column column-width="proportional-column-width(7.097)" column-number="6"/>
3079                                                                                <fo:table-column column-width="proportional-column-width(12)" column-number="7"/>
3080                                                                                <fo:table-column column-width="proportional-column-width(49.62)" column-number="8"/>
3081                                                                                <fo:table-body>
3082                                                                                        <fo:table-row font-weight="bold">
3083                                                                                                <fo:table-cell>
3084                                                                                                        <fo:block>
3085                                                                                                                <fo:basic-link external-destination="url({$url_mdTop})">Start Depth</fo:basic-link>
3086                                                                                                        </fo:block>
3087                                                                                                        <fo:block>mMD</fo:block>
3088                                                                                                </fo:table-cell>
3089                                                                                                <fo:table-cell>
3090                                                                                                        <fo:block>
3091                                                                                                                <fo:basic-link external-destination="url({$url_mdBottom})">End Depth</fo:basic-link>
3092                                                                                                        </fo:block>
3093                                                                                                        <fo:block>mMD</fo:block>
3094                                                                                                </fo:table-cell>
3095                                                                                                <fo:table-cell>
3096                                                                                                        <fo:block>
3097                                                                                                                <fo:basic-link external-destination="url({$url_mdBottom})">Difference in Depth</fo:basic-link>
3098                                                                                                        </fo:block>
3099                                                                                                        <fo:block>mMD</fo:block>
3100                                                                                                </fo:table-cell>
3101                                                                                                <fo:table-cell>
3102                                                                                                        <fo:block>
3103                                                                                                                <fo:basic-link external-destination="url({$url_tvdTop})">Start Depth</fo:basic-link>
3104                                                                                                        </fo:block>
3105                                                                                                        <fo:block>mTVD</fo:block>
3106                                                                                                </fo:table-cell>
3107                                                                                                <fo:table-cell>
3108                                                                                                        <fo:block>
3109                                                                                                                <fo:basic-link external-destination="url({$url_tvdBottom})">End Depth</fo:basic-link>
3110                                                                                                        </fo:block>
3111                                                                                                        <fo:block>mTVD</fo:block>
3112                                                                                                </fo:table-cell>
3113                                                                                                <fo:table-cell>
3114                                                                                                        <fo:block>
3115                                                                                                                <fo:basic-link external-destination="url({$url_tvdBottom})">Difference in Depth</fo:basic-link>
3116                                                                                                        </fo:block>
3117                                                                                                        <fo:block>mTVD</fo:block>
3118                                                                                                </fo:table-cell>
3119                                                                                                <fo:table-cell>
3120                                                                                                        <fo:block>
3121                                                                                                                <fo:basic-link external-destination="url({$url_show})">Shows Description</fo:basic-link>
3122                                                                                                        </fo:block>
3123                                                                                                </fo:table-cell>
3124                                                                                                <fo:table-cell>
3125                                                                                                        <fo:block>
3126                                                                                                                <fo:basic-link external-destination="url({$url_lithology})">Lithology Description</fo:basic-link>
3127                                                                                                        </fo:block>
3128                                                                                                </fo:table-cell>
3129                                                                                        </fo:table-row>
3130                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:lithShowInfo">
3131<fo:table-row>
3132                                                                                                <fo:table-cell>
3133                                                                                                        <fo:block>
3134                                                                                                                <xsl:if test="string(witsml:mdTop)"><fo:inline>
3135<xsl:value-of select="witsml:mdTop"/>
3136</fo:inline></xsl:if>
3137                                                                                                        </fo:block>
3138                                                                                                </fo:table-cell>
3139                                                                                                <fo:table-cell>
3140                                                                                                        <fo:block>
3141                                                                                                                <xsl:if test="string(witsml:mdBottom)"><fo:inline>
3142<xsl:value-of select="witsml:mdBottom"/>
3143</fo:inline></xsl:if>
3144                                                                                                        </fo:block>
3145                                                                                                </fo:table-cell>
3146                                                                                                <fo:table-cell>
3147                                                                                                        <fo:block>
3148                                                                                                                <xsl:if test="string(witsml:mdBottom - witsml:mdTop)"><fo:inline>
3149<xsl:value-of select="witsml:mdBottom - witsml:mdTop"/>
3150</fo:inline></xsl:if>
3151                                                                                                        </fo:block>
3152                                                                                                </fo:table-cell>
3153                                                                                                <fo:table-cell>
3154                                                                                                        <fo:block>
3155                                                                                                                <xsl:if test="string(witsml:tvdTop)"><fo:inline>
3156<xsl:value-of select="witsml:tvdTop"/>
3157</fo:inline></xsl:if>
3158                                                                                                        </fo:block>
3159                                                                                                </fo:table-cell>
3160                                                                                                <fo:table-cell>
3161                                                                                                        <fo:block>
3162                                                                                                                <xsl:if test="string(witsml:tvdBottom)"><fo:inline>
3163<xsl:value-of select="witsml:tvdBottom"/>
3164</fo:inline></xsl:if>
3165                                                                                                        </fo:block>
3166                                                                                                </fo:table-cell>
3167                                                                                                <fo:table-cell>
3168                                                                                                        <fo:block>
3169                                                                                                                <xsl:if test="string(witsml:tvdBottom - witsml:tvdTop)"><fo:inline>
3170<xsl:value-of select="witsml:tvdBottom - witsml:tvdTop"/>
3171</fo:inline></xsl:if>
3172                                                                                                        </fo:block>
3173                                                                                                </fo:table-cell>
3174                                                                                                <fo:table-cell>
3175                                                                                                        <fo:block>
3176                                                                                                                <xsl:if test="string(witsml:show)"><fo:inline>
3177<xsl:value-of select="witsml:show"/>
3178</fo:inline></xsl:if>
3179                                                                                                        </fo:block>
3180                                                                                                </fo:table-cell>
3181                                                                                                <fo:table-cell>
3182                                                                                                        <fo:block>
3183                                                                                                                <xsl:if test="string(witsml:lithology)"><fo:inline>
3184<xsl:value-of select="witsml:lithology"/>
3185</fo:inline></xsl:if>
3186                                                                                                        </fo:block>
3187                                                                                                </fo:table-cell>
3188                                                                                        </fo:table-row>
3189</xsl:for-each>
3190                                                                                </fo:table-body>
3191                                                                        </fo:table> </fo:block>
3192                                                        </fo:table-cell>
3193                                                </fo:table-row>
3194                                        </fo:table-body>
3195                                </fo:table>
3196                        </fo:block>
3197<xslt:comment> Well Control Incident </xslt:comment>
3198                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:controlIncidentInfo">
3199<fo:block>
3200                                        <xsl:variable name="element_drillReportControlIncidentInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportControlIncidentInfo']/xsd:sequence"/>
3201                                        <xsl:variable name="url_dTim">
3202                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='dTim']/@sawsdl:modelReference"/>
3203                                        </xsl:variable>
3204                                        <xsl:variable name="url_mdInflow">
3205                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='mdInflow']/@sawsdl:modelReference"/>
3206                                        </xsl:variable>
3207                                        <xsl:variable name="url_tvdInflow">
3208                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='tvdInflow']/@sawsdl:modelReference"/>
3209                                        </xsl:variable>
3210                                        <xsl:variable name="url_eTimLost">
3211                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='eTimLost']/@sawsdl:modelReference"/>
3212                                        </xsl:variable>
3213                                        <xsl:variable name="url_dTimRegained">
3214                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='dTimRegained']/@sawsdl:modelReference"/>
3215                                        </xsl:variable>
3216                                        <xsl:variable name="url_mdBit">
3217                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='mdBit']/@sawsdl:modelReference"/>
3218                                        </xsl:variable>
3219                                        <xsl:variable name="url_wtMud">
3220                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='wtMud']/@sawsdl:modelReference"/>
3221                                        </xsl:variable>
3222                                        <xsl:variable name="url_porePressure">
3223                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='porePressure']/@sawsdl:modelReference"/>
3224                                        </xsl:variable>
3225                                        <xsl:variable name="url_mdCsgLast">
3226                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='mdCsgLast']/@sawsdl:modelReference"/>
3227                                        </xsl:variable>
3228                                        <xsl:variable name="url_volMudGained">
3229                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='volMudGained']/@sawsdl:modelReference"/>
3230                                        </xsl:variable>
3231                                        <xsl:variable name="url_presShutInCasing">
3232                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='presShutInCasing']/@sawsdl:modelReference"/>
3233                                        </xsl:variable>
3234                                        <xsl:variable name="url_presShutInDrill">
3235                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='presShutInDrill']/@sawsdl:modelReference"/>
3236                                        </xsl:variable>
3237                                        <xsl:variable name="url_incidentType">
3238                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='incidentType']/@sawsdl:modelReference"/>
3239                                        </xsl:variable>
3240                                        <xsl:variable name="url_killingType">
3241                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='killingType']/@sawsdl:modelReference"/>
3242                                        </xsl:variable>
3243                                        <xsl:variable name="url_formation">
3244                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='formation']/@sawsdl:modelReference"/>
3245                                        </xsl:variable>
3246                                        <xsl:variable name="url_tempBottom">
3247                                                <xsl:value-of select="$element_drillReportControlIncidentInfo//xsd:element[@name='tempBottom']/@sawsdl:modelReference"/>
3248                                        </xsl:variable>
3249                                        <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
3250                                        <fo:leader/>
3251                                        <fo:table>
3252                                                <fo:table-column column-width="100%"/>
3253                                                <fo:table-body>
3254                                                        <fo:table-row font-weight="bold" font-size="14pt">
3255                                                                <fo:table-cell>
3256                                                                        <fo:block>
3257                                                                        Well Control Incident
3258                                                                </fo:block>
3259                                                                </fo:table-cell>
3260                                                        </fo:table-row>
3261                                                        <fo:table-row height="13.840px" overflow="hidden">
3262                                                                <fo:table-cell>
3263                                                                        <fo:block> </fo:block>
3264                                                                </fo:table-cell>
3265                                                        </fo:table-row>
3266                                                        <fo:table-row>
3267                                                                <fo:table-cell>
3268                                                                        <fo:block><fo:table table-layout="fixed" width="100%" border-collapse="collapse">
3269                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="1"/>
3270                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="2"/>
3271                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="3"/>
3272                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="4"/>
3273                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="5"/>
3274                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="6"/>
3275                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="7"/>
3276                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="8"/>
3277                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="9"/>
3278                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="10"/>
3279                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="11"/>
3280                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="12"/>
3281                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="13"/>
3282                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="14"/>
3283                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="15"/>
3284                                                                                        <fo:table-column column-width="proportional-column-width(6.25)" column-number="16"/>
3285                                                                                        <fo:table-body>
3286                                                                                                <fo:table-row font-weight="bold">
3287                                                                                                        <fo:table-cell>
3288                                                                                                                <fo:block>
3289                                                                                                                        <fo:basic-link external-destination="url({$url_dTim})">Date</fo:basic-link>
3290                                                                                                                </fo:block>
3291                                                                                                        </fo:table-cell>
3292                                                                                                        <fo:table-cell>
3293                                                                                                                <fo:block>
3294                                                                                                                        <fo:basic-link external-destination="url({$url_mdInflow})">Depth of well</fo:basic-link>
3295                                                                                                                        <fo:block>mMD</fo:block>
3296                                                                                                                </fo:block>
3297                                                                                                        </fo:table-cell>
3298                                                                                                        <fo:table-cell>
3299                                                                                                                <fo:block>
3300                                                                                                                        <fo:basic-link external-destination="url({$url_tvdInflow})">Depth of well mTVD</fo:basic-link>
3301                                                                                                                </fo:block>
3302                                                                                                        </fo:table-cell>
3303                                                                                                        <fo:table-cell>
3304                                                                                                                <fo:block>
3305                                                                                                                        <fo:basic-link external-destination="url({$url_eTimLost})">Lost time</fo:basic-link>
3306                                                                                                                </fo:block>
3307                                                                                                                <fo:block>
3308                                                                                                                        <xsl:if test="string(witsml:eTimLost/@uom)"><fo:inline>
3309<xsl:value-of select="witsml:eTimLost/@uom"/>
3310</fo:inline></xsl:if>
3311                                                                                                                </fo:block>
3312                                                                                                        </fo:table-cell>
3313                                                                                                        <fo:table-cell>
3314                                                                                                                <fo:block>
3315                                                                                                                        <fo:basic-link external-destination="url({$url_dTimRegained})">Time for well control regain</fo:basic-link>
3316                                                                                                                </fo:block>
3317                                                                                                        </fo:table-cell>
3318                                                                                                        <fo:table-cell>
3319                                                                                                                <fo:block>
3320                                                                                                                        <fo:basic-link external-destination="url({$url_mdBit})">Depth at bit</fo:basic-link>
3321                                                                                                                        <fo:block>mMD</fo:block>
3322                                                                                                                </fo:block>
3323                                                                                                        </fo:table-cell>
3324                                                                                                        <fo:table-cell>
3325                                                                                                                <fo:block>
3326                                                                                                                        <fo:basic-link external-destination="url({$url_wtMud})">Drilling fluid density</fo:basic-link>
3327                                                                                                                </fo:block>
3328                                                                                                                <fo:block>
3329                                                                                                                        <xsl:if test="string(witsml:wtMud/@uom)"><fo:inline>
3330<xsl:value-of select="witsml:wtMud/@uom"/>
3331</fo:inline></xsl:if>
3332                                                                                                                </fo:block>
3333                                                                                                        </fo:table-cell>
3334                                                                                                        <fo:table-cell>
3335                                                                                                                <fo:block>
3336                                                                                                                        <fo:basic-link external-destination="url({$url_porePressure})">Pore pressure</fo:basic-link>
3337                                                                                                                </fo:block>
3338                                                                                                                <fo:block>
3339                                                                                                                        <xsl:if test="string(witsml:porePressure/@uom)"><fo:inline>
3340<xsl:value-of select="witsml:porePressure/@uom"/>
3341</fo:inline></xsl:if>
3342                                                                                                                </fo:block>
3343                                                                                                        </fo:table-cell>
3344                                                                                                        <fo:table-cell>
3345                                                                                                                <fo:block>
3346                                                                                                                        <fo:basic-link external-destination="url({$url_mdCsgLast})">Depth to casing</fo:basic-link>
3347                                                                                                                </fo:block>
3348                                                                                                                <fo:block>mMD</fo:block>
3349                                                                                                        </fo:table-cell>
3350                                                                                                        <fo:table-cell>
3351                                                                                                                <fo:block>
3352                                                                                                                        <fo:basic-link external-destination="url({$url_volMudGained})">Gained vol of Fluid</fo:basic-link>
3353                                                                                                                </fo:block>
3354                                                                                                                <fo:block>
3355                                                                                                                        <xsl:if test="string(witsml:volMudGain/@uom)"><fo:inline>
3356<xsl:value-of select="witsml:volMudGain/@uom"/>
3357</fo:inline></xsl:if>
3358                                                                                                                </fo:block>
3359                                                                                                        </fo:table-cell>
3360                                                                                                        <fo:table-cell>
3361                                                                                                                <fo:block>
3362                                                                                                                        <fo:basic-link external-destination="url({$url_presShutInCasing})">Shut in casing pressure</fo:basic-link>
3363                                                                                                                </fo:block>
3364                                                                                                                <fo:block>
3365                                                                                                                        <xsl:if test="string(witsml:presShutInCasing/@uom)"><fo:inline>
3366<xsl:value-of select="witsml:presShutInCasing/@uom"/>
3367</fo:inline></xsl:if>
3368                                                                                                                </fo:block>
3369                                                                                                        </fo:table-cell>
3370                                                                                                        <fo:table-cell>
3371                                                                                                                <fo:block>
3372                                                                                                                        <fo:basic-link external-destination="url({$url_presShutInDrill})">Shut in drill pipe pressure</fo:basic-link>
3373                                                                                                                </fo:block>
3374                                                                                                                <fo:block>
3375                                                                                                                        <xsl:if test="string(witsml:presShutInDrill/@uom)"><fo:inline>
3376<xsl:value-of select="witsml:presShutInDrill/@uom"/>
3377</fo:inline></xsl:if>
3378                                                                                                                </fo:block>
3379                                                                                                        </fo:table-cell>
3380                                                                                                        <fo:table-cell>
3381                                                                                                                <fo:block>
3382                                                                                                                        <fo:basic-link external-destination="url({$url_incidentType})">Incident class</fo:basic-link>
3383                                                                                                                </fo:block>
3384                                                                                                        </fo:table-cell>
3385                                                                                                        <fo:table-cell>
3386                                                                                                                <fo:block>
3387                                                                                                                        <fo:basic-link external-destination="url({$url_killingType})">Killing procd</fo:basic-link>
3388                                                                                                                </fo:block>
3389                                                                                                        </fo:table-cell>
3390                                                                                                        <fo:table-cell>
3391                                                                                                                <fo:block>
3392                                                                                                                        <fo:basic-link external-destination="url({$url_formation})">Formation</fo:basic-link>
3393                                                                                                                </fo:block>
3394                                                                                                        </fo:table-cell>
3395                                                                                                        <fo:table-cell>
3396                                                                                                                <fo:block>
3397                                                                                                                        <fo:basic-link external-destination="url({$url_tempBottom})">BHT</fo:basic-link>
3398                                                                                                                </fo:block>
3399                                                                                                        </fo:table-cell>
3400                                                                                                </fo:table-row>
3401                                                                                                <fo:table-row>
3402                                                                                                        <fo:table-cell>
3403                                                                                                                <fo:block>
3404                                                                                                                        <xsl:if test="string(substring-before(witsml:dTim, 'T'))"><fo:inline>
3405<xsl:value-of select="substring-before(witsml:dTim, 'T')"/>
3406</fo:inline></xsl:if>
3407                                                                                                                </fo:block>
3408                                                                                                        </fo:table-cell>
3409                                                                                                        <fo:table-cell>
3410                                                                                                                <fo:block>
3411                                                                                                                        <xsl:if test="string(witsml:mdInflow)"><fo:inline>
3412<xsl:value-of select="witsml:mdInflow"/>
3413</fo:inline></xsl:if>
3414                                                                                                                </fo:block>
3415                                                                                                        </fo:table-cell>
3416                                                                                                        <fo:table-cell>
3417                                                                                                                <fo:block>
3418                                                                                                                        <xsl:if test="string(witsml:tvdInFlow)"><fo:inline>
3419<xsl:value-of select="witsml:tvdInFlow"/>
3420</fo:inline></xsl:if>
3421                                                                                                                </fo:block>
3422                                                                                                        </fo:table-cell>
3423                                                                                                        <fo:table-cell>
3424                                                                                                                <fo:block>
3425                                                                                                                        <xsl:if test="string(witsml:eTimLost)"><fo:inline>
3426<xsl:value-of select="witsml:eTimLost"/>
3427</fo:inline></xsl:if>
3428                                                                                                                </fo:block>
3429                                                                                                        </fo:table-cell>
3430                                                                                                        <fo:table-cell>
3431                                                                                                                <fo:block>
3432                                                                                                                        <xsl:if test="string(substring-after(substring(witsml:dTimRegained, 0, 17), 'T'))"><fo:inline>
3433<xsl:value-of select="substring-after(substring(witsml:dTimRegained, 0, 17), 'T')"/>
3434</fo:inline></xsl:if>
3435                                                                                                                </fo:block>
3436                                                                                                        </fo:table-cell>
3437                                                                                                        <fo:table-cell>
3438                                                                                                                <fo:block>
3439                                                                                                                        <xsl:if test="string(witsml:mdBit)"><fo:inline>
3440<xsl:value-of select="witsml:mdBit"/>
3441</fo:inline></xsl:if>
3442                                                                                                                </fo:block>
3443                                                                                                        </fo:table-cell>
3444                                                                                                        <fo:table-cell>
3445                                                                                                                <fo:block>
3446                                                                                                                        <xsl:if test="string(witsml:wtMud)"><fo:inline>
3447<xsl:value-of select="witsml:wtMud"/>
3448</fo:inline></xsl:if>
3449                                                                                                                </fo:block>
3450                                                                                                        </fo:table-cell>
3451                                                                                                        <fo:table-cell>
3452                                                                                                                <fo:block>
3453                                                                                                                        <xsl:if test="string(witsml:porePressure)"><fo:inline>
3454<xsl:value-of select="witsml:porePressure"/>
3455</fo:inline></xsl:if>
3456                                                                                                                </fo:block>
3457                                                                                                        </fo:table-cell>
3458                                                                                                        <fo:table-cell>
3459                                                                                                                <fo:block>
3460                                                                                                                        <xsl:if test="string(witsml:mdCsgLast)"><fo:inline>
3461<xsl:value-of select="witsml:mdCsgLast"/>
3462</fo:inline></xsl:if>
3463                                                                                                                </fo:block>
3464                                                                                                        </fo:table-cell>
3465                                                                                                        <fo:table-cell>
3466                                                                                                                <fo:block>
3467                                                                                                                        <xsl:if test="string(witsml:volMudGained)"><fo:inline>
3468<xsl:value-of select="witsml:volMudGained"/>
3469</fo:inline></xsl:if>
3470                                                                                                                </fo:block>
3471                                                                                                        </fo:table-cell>
3472                                                                                                        <fo:table-cell>
3473                                                                                                                <fo:block>
3474                                                                                                                        <xsl:if test="string(witsml:presShutInCasing)"><fo:inline>
3475<xsl:value-of select="witsml:presShutInCasing"/>
3476</fo:inline></xsl:if>
3477                                                                                                                </fo:block>
3478                                                                                                        </fo:table-cell>
3479                                                                                                        <fo:table-cell>
3480                                                                                                                <fo:block>
3481                                                                                                                        <xsl:if test="string(witsml:presShutInDrill)"><fo:inline>
3482<xsl:value-of select="witsml:presShutInDrill"/>
3483</fo:inline></xsl:if>
3484                                                                                                                </fo:block>
3485                                                                                                        </fo:table-cell>
3486                                                                                                        <fo:table-cell>
3487                                                                                                                <fo:block>
3488                                                                                                                        <xsl:if test="string(witsml:incidentType)"><fo:inline>
3489<xsl:value-of select="witsml:incidentType"/>
3490</fo:inline></xsl:if>
3491                                                                                                                </fo:block>
3492                                                                                                        </fo:table-cell>
3493                                                                                                        <fo:table-cell>
3494                                                                                                                <fo:block>
3495                                                                                                                        <xsl:if test="string(witsml:killingType)"><fo:inline>
3496<xsl:value-of select="witsml:killingType"/>
3497</fo:inline></xsl:if>
3498                                                                                                                </fo:block>
3499                                                                                                        </fo:table-cell>
3500                                                                                                        <fo:table-cell>
3501                                                                                                                <fo:block>
3502                                                                                                                        <xsl:if test="string(witsml:formation)"><fo:inline>
3503<xsl:value-of select="witsml:formation"/>
3504</fo:inline></xsl:if>
3505                                                                                                                </fo:block>
3506                                                                                                        </fo:table-cell>
3507                                                                                                        <fo:table-cell>
3508                                                                                                                <fo:block>
3509                                                                                                                        <xsl:if test="string(witsml:tempBottom)"><fo:inline>
3510<xsl:value-of select="witsml:tempBottom"/>
3511</fo:inline></xsl:if>
3512                                                                                                                </fo:block>
3513                                                                                                        </fo:table-cell>
3514                                                                                                </fo:table-row>
3515                                                                                        </fo:table-body>
3516                                                                                </fo:table><fo:table>
3517                                                                                        <fo:table-body>
3518                                                                                                <fo:table-row>
3519                                                                                                        <fo:table-cell>
3520                                                                                                                <fo:block> </fo:block>
3521                                                                                                        </fo:table-cell>
3522                                                                                                </fo:table-row>
3523                                                                                                <fo:table-row>
3524                                                                                                        <fo:table-cell>
3525                                                                                                                <fo:block>
3526                                                                                                                        <xsl:if test="string(witsml:description)"><fo:inline>
3527<xsl:value-of select="witsml:description"/>
3528</fo:inline></xsl:if>
3529                                                                                                                </fo:block>
3530                                                                                                        </fo:table-cell>
3531                                                                                                </fo:table-row>
3532                                                                                        </fo:table-body>
3533                                                                                </fo:table> </fo:block>
3534                                                                </fo:table-cell>
3535                                                        </fo:table-row>
3536                                                </fo:table-body>
3537                                        </fo:table>
3538                                </fo:block>
3539</xsl:for-each>
3540<xslt:comment> Perforation Information </xslt:comment>
3541                        <fo:block break-before="page">
3542                                <xsl:variable name="element_drillReportPerfInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportPerfInfo']/xsd:sequence"/>
3543                                <xsl:variable name="url_dTimOpen">
3544                                        <xsl:value-of select="$element_drillReportPerfInfo//xsd:element[@name='dTimOpen']/@sawsdl:modelReference"/>
3545                                </xsl:variable>
3546                                <xsl:variable name="url_dTimClose">
3547                                        <xsl:value-of select="$element_drillReportPerfInfo//xsd:element[@name='dTimClose']/@sawsdl:modelReference"/>
3548                                </xsl:variable>
3549                                <xsl:variable name="url_mdTop">
3550                                        <xsl:value-of select="$element_drillReportPerfInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
3551                                </xsl:variable>
3552                                <xsl:variable name="url_mdBottom">
3553                                        <xsl:value-of select="$element_drillReportPerfInfo//xsd:element[@name='mdBottom']/@sawsdl:modelReference"/>
3554                                </xsl:variable>
3555                                <xsl:variable name="url_tvdTop">
3556                                        <xsl:value-of select="$element_drillReportPerfInfo//xsd:element[@name='tvdTop']/@sawsdl:modelReference"/>
3557                                </xsl:variable>
3558                                <xsl:variable name="url_tvdBottom">
3559                                        <xsl:value-of select="$element_drillReportPerfInfo//xsd:element[@name='tvdBottom']/@sawsdl:modelReference"/>
3560                                </xsl:variable>
3561                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
3562                                <fo:leader/>
3563                                <fo:table>
3564                                        <fo:table-column column-width="100%"/>
3565                                        <fo:table-body>
3566                                                <fo:table-row font-weight="bold" font-size="14pt">
3567                                                        <fo:table-cell>
3568                                                                <fo:block>
3569                                                                        Perforation Information
3570                                                                </fo:block>
3571                                                        </fo:table-cell>
3572                                                </fo:table-row>
3573                                                <fo:table-row>
3574                                                        <fo:table-cell>
3575                                                                <fo:block> </fo:block>
3576                                                        </fo:table-cell>
3577                                                </fo:table-row>
3578                                                <fo:table-row>
3579                                                        <fo:table-cell>
3580                                                                <fo:block><fo:table table-layout="fixed" width="100%" border-collapse="collapse">
3581                                                                                <fo:table-column column-width="proportional-column-width(14.286)" column-number="1"/>
3582                                                                                <fo:table-column column-width="proportional-column-width(14.286)" column-number="2"/>
3583                                                                                <fo:table-column column-width="proportional-column-width(14.286)" column-number="3"/>
3584                                                                                <fo:table-column column-width="proportional-column-width(14.286)" column-number="4"/>
3585                                                                                <fo:table-column column-width="proportional-column-width(14.286)" column-number="5"/>
3586                                                                                <fo:table-column column-width="proportional-column-width(14.286)" column-number="6"/>
3587                                                                                <fo:table-column column-width="proportional-column-width(14.286)" column-number="7"/>
3588                                                                                <fo:table-body>
3589                                                                                        <fo:table-row font-weight="bold">
3590                                                                                                <fo:table-cell>
3591                                                                                                        <fo:block>
3592                                                                                                                <fo:basic-link external-destination="url({$url_dTimOpen})">Time of opening well perf</fo:basic-link>
3593                                                                                                        </fo:block>
3594                                                                                                </fo:table-cell>
3595                                                                                                <fo:table-cell>
3596                                                                                                        <fo:block>
3597                                                                                                                <fo:basic-link external-destination="url({$url_dTimClose})">Time of closing well perf</fo:basic-link>
3598                                                                                                        </fo:block>
3599                                                                                                </fo:table-cell>
3600                                                                                                <fo:table-cell>
3601                                                                                                        <fo:block>
3602                                                                                                                <fo:basic-link external-destination="url({$urlRDS})">Duration well perf</fo:basic-link>
3603                                                                                                        </fo:block>
3604                                                                                                </fo:table-cell>
3605                                                                                                <fo:table-cell>
3606                                                                                                        <fo:block>
3607                                                                                                                <fo:basic-link external-destination="url({$url_mdTop})">Top of perf</fo:basic-link>
3608                                                                                                        </fo:block>
3609                                                                                                        <fo:block>mMD</fo:block>
3610                                                                                                </fo:table-cell>
3611                                                                                                <fo:table-cell>
3612                                                                                                        <fo:block>
3613                                                                                                                <fo:basic-link external-destination="url({$url_mdBottom})">Bottom of Perf</fo:basic-link>
3614                                                                                                        </fo:block>
3615                                                                                                        <fo:block>mMD</fo:block>
3616                                                                                                </fo:table-cell>
3617                                                                                                <fo:table-cell>
3618                                                                                                        <fo:block>
3619                                                                                                                <fo:basic-link external-destination="url({$url_tvdTop})">Top of perf</fo:basic-link>
3620                                                                                                        </fo:block>
3621                                                                                                        <fo:block>mTVD</fo:block>
3622                                                                                                </fo:table-cell>
3623                                                                                                <fo:table-cell>
3624                                                                                                        <fo:block>
3625                                                                                                                <fo:basic-link external-destination="url({$url_tvdBottom})">Bottom of Perf</fo:basic-link>
3626                                                                                                        </fo:block>
3627                                                                                                        <fo:block>mTVD</fo:block>
3628                                                                                                </fo:table-cell>
3629                                                                                        </fo:table-row>
3630                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:perfInfo">
3631<fo:table-row>
3632                                                                                                <fo:table-cell>
3633                                                                                                        <fo:block>
3634                                                                                                                <xsl:if test="string(substring(witsml:dTimOpen, 0 ,17))"><fo:inline>
3635<xsl:value-of select="substring(witsml:dTimOpen, 0 ,17)"/>
3636</fo:inline></xsl:if>
3637                                                                                                        </fo:block>
3638                                                                                                </fo:table-cell>
3639                                                                                                <fo:table-cell>
3640                                                                                                        <fo:block>
3641                                                                                                                <xsl:if test="string(substring(witsml:dTimClose, 0, 17))"><fo:inline>
3642<xsl:value-of select="substring(witsml:dTimClose, 0, 17)"/>
3643</fo:inline></xsl:if>
3644                                                                                                        </fo:block>
3645                                                                                                </fo:table-cell>
3646                                                                                                <fo:table-cell>
3647                                                                                                        <fo:block><xslt:comment>&lt;xfd:field xpath="substring-after(xsl:dateTime(witsml:dTimClose) - xsl:dateTime(witsml:dTimOpen), 'PT')"/&gt;</xslt:comment>
3648                                                                                                                duration
3649                                                                                                        </fo:block>
3650                                                                                                </fo:table-cell>
3651                                                                                                <fo:table-cell>
3652                                                                                                        <fo:block>
3653                                                                                                                <xsl:if test="string(witsml:mdTop)"><fo:inline>
3654<xsl:value-of select="witsml:mdTop"/>
3655</fo:inline></xsl:if>
3656                                                                                                        </fo:block>
3657                                                                                                </fo:table-cell>
3658                                                                                                <fo:table-cell>
3659                                                                                                        <fo:block>
3660                                                                                                                <xsl:if test="string(witsml:mdBottom)"><fo:inline>
3661<xsl:value-of select="witsml:mdBottom"/>
3662</fo:inline></xsl:if>
3663                                                                                                        </fo:block>
3664                                                                                                </fo:table-cell>
3665                                                                                                <fo:table-cell>
3666                                                                                                        <fo:block>
3667                                                                                                                <xsl:if test="string(witsml:tvdTop)"><fo:inline>
3668<xsl:value-of select="witsml:tvdTop"/>
3669</fo:inline></xsl:if>
3670                                                                                                        </fo:block>
3671                                                                                                </fo:table-cell>
3672                                                                                                <fo:table-cell>
3673                                                                                                        <fo:block>
3674                                                                                                                <xsl:if test="string(witsml:tvdBottom)"><fo:inline>
3675<xsl:value-of select="witsml:tvdBottom"/>
3676</fo:inline></xsl:if>
3677                                                                                                        </fo:block>
3678                                                                                                </fo:table-cell>
3679                                                                                        </fo:table-row>
3680</xsl:for-each>
3681                                                                                </fo:table-body>
3682                                                                        </fo:table> </fo:block>
3683                                                        </fo:table-cell>
3684                                                </fo:table-row>
3685                                        </fo:table-body>
3686                                </fo:table>
3687                        </fo:block>
3688<xslt:comment> Gas Reading Information </xslt:comment>
3689                        <fo:block>
3690                                <xsl:variable name="element_drillReportGasReadingInfo" select="document($ddrSchema)/xsd:schema/xsd:complexType[@name='cs_drillReportGasReadingInfo']/xsd:sequence"/>
3691                                <xsl:variable name="url_dTim">
3692                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='dTim']/@sawsdl:modelReference"/>
3693                                </xsl:variable>
3694                                <xsl:variable name="url_readingType">
3695                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='readingType']/@sawsdl:modelReference"/>
3696                                </xsl:variable>
3697                                <xsl:variable name="url_mdTop">
3698                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='mdTop']/@sawsdl:modelReference"/>
3699                                </xsl:variable>
3700                                <xsl:variable name="url_mdBottom">
3701                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='mdBottom']/@sawsdl:modelReference"/>
3702                                </xsl:variable>
3703                                <xsl:variable name="url_tvdTop">
3704                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='tvdTop']/@sawsdl:modelReference"/>
3705                                </xsl:variable>
3706                                <xsl:variable name="url_tvdBottom">
3707                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='tvdBottom']/@sawsdl:modelReference"/>
3708                                </xsl:variable>
3709                                <xsl:variable name="url_gasHigh">
3710                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='gasHigh']/@sawsdl:modelReference"/>
3711                                </xsl:variable>
3712                                <xsl:variable name="url_gasLow">
3713                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='gasLow']/@sawsdl:modelReference"/>
3714                                </xsl:variable>
3715                                <xsl:variable name="url_meth">
3716                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='meth']/@sawsdl:modelReference"/>
3717                                </xsl:variable>
3718                                <xsl:variable name="url_eth">
3719                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='eth']/@sawsdl:modelReference"/>
3720                                </xsl:variable>
3721                                <xsl:variable name="url_prop">
3722                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='prop']/@sawsdl:modelReference"/>
3723                                </xsl:variable>
3724                                <xsl:variable name="url_ibut">
3725                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='ibut']/@sawsdl:modelReference"/>
3726                                </xsl:variable>
3727                                <xsl:variable name="url_ipent">
3728                                        <xsl:value-of select="$element_drillReportGasReadingInfo//xsd:element[@name='ipent']/@sawsdl:modelReference"/>
3729                                </xsl:variable>
3730                                <fo:leader rule-thickness="2px" leader-length="100%" leader-pattern="rule"/>
3731                                <fo:leader/>
3732                                <fo:table>
3733                                        <fo:table-column column-width="100%"/>
3734                                        <fo:table-body>
3735                                                <fo:table-row font-weight="bold" font-size="14pt">
3736                                                        <fo:table-cell>
3737                                                                <fo:block>
3738                                                                        Gas Reading Information
3739                                                                </fo:block>
3740                                                        </fo:table-cell>
3741                                                </fo:table-row>
3742                                                <fo:table-row>
3743                                                        <fo:table-cell>
3744                                                                <fo:block> </fo:block>
3745                                                        </fo:table-cell>
3746                                                </fo:table-row>
3747                                                <fo:table-row>
3748                                                        <fo:table-cell>
3749                                                                <fo:block><fo:table table-layout="fixed" width="100%" border-collapse="collapse">
3750                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="1"/>
3751                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="2"/>
3752                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="3"/>
3753                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="4"/>
3754                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="5"/>
3755                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="6"/>
3756                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="7"/>
3757                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="8"/>
3758                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="9"/>
3759                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="10"/>
3760                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="11"/>
3761                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="12"/>
3762                                                                                <fo:table-column column-width="proportional-column-width(7.692)" column-number="13"/>
3763                                                                                <fo:table-body>
3764                                                                                        <fo:table-row font-weight="bold">
3765                                                                                                <fo:table-cell>
3766                                                                                                        <fo:block>
3767                                                                                                                <fo:basic-link external-destination="url({$url_dTim})">Time</fo:basic-link>
3768                                                                                                        </fo:block>
3769                                                                                                </fo:table-cell>
3770                                                                                                <fo:table-cell>
3771                                                                                                        <fo:block>
3772                                                                                                                <fo:basic-link external-destination="url({$url_readingType})">Class</fo:basic-link>
3773                                                                                                        </fo:block>
3774                                                                                                </fo:table-cell>
3775                                                                                                <fo:table-cell>
3776                                                                                                        <fo:block>
3777                                                                                                                <fo:basic-link external-destination="url({$url_mdTop})">Depth to top</fo:basic-link>
3778                                                                                                        </fo:block>
3779                                                                                                        <fo:block>mMD</fo:block>
3780                                                                                                </fo:table-cell>
3781                                                                                                <fo:table-cell>
3782                                                                                                        <fo:block>
3783                                                                                                                <fo:basic-link external-destination="url({$url_mdBottom})">Depth to bottom</fo:basic-link>
3784                                                                                                        </fo:block>
3785                                                                                                        <fo:block>mMD</fo:block>
3786                                                                                                </fo:table-cell>
3787                                                                                                <fo:table-cell>
3788                                                                                                        <fo:block>
3789                                                                                                                <fo:basic-link external-destination="url({$url_tvdTop})">Depth to top</fo:basic-link>
3790                                                                                                        </fo:block>
3791                                                                                                        <fo:block>mTVD</fo:block>
3792                                                                                                </fo:table-cell>
3793                                                                                                <fo:table-cell>
3794                                                                                                        <fo:block>
3795                                                                                                                <fo:basic-link external-destination="url({$url_tvdBottom})">Depth to bottom</fo:basic-link>
3796                                                                                                        </fo:block>
3797                                                                                                        <fo:block>mTVD</fo:block>
3798                                                                                                </fo:table-cell>
3799                                                                                                <fo:table-cell>
3800                                                                                                        <fo:block>
3801                                                                                                                <fo:basic-link external-destination="url({$url_gasHigh})">Highest gas</fo:basic-link>
3802                                                                                                        </fo:block>
3803                                                                                                        <fo:block>
3804                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:gasHigh/@uom)"><fo:inline>
3805<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:gasHigh/@uom"/>
3806</fo:inline></xsl:if>
3807                                                                                                        </fo:block>
3808                                                                                                </fo:table-cell>
3809                                                                                                <fo:table-cell>
3810                                                                                                        <fo:block>
3811                                                                                                                <fo:basic-link external-destination="url({$url_gasLow})">Lowest gas</fo:basic-link>
3812                                                                                                        </fo:block>
3813                                                                                                        <fo:block>
3814                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:gasLow/@uom)"><fo:inline>
3815<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:gasLow/@uom"/>
3816</fo:inline></xsl:if>
3817                                                                                                        </fo:block>
3818                                                                                                </fo:table-cell>
3819                                                                                                <fo:table-cell>
3820                                                                                                        <fo:block>
3821                                                                                                                <fo:basic-link external-destination="url({$url_meth})">C1</fo:basic-link>
3822                                                                                                        </fo:block>
3823                                                                                                        <fo:block>
3824                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:meth/@uom)"><fo:inline>
3825<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:meth/@uom"/>
3826</fo:inline></xsl:if>
3827                                                                                                        </fo:block>
3828                                                                                                </fo:table-cell>
3829                                                                                                <fo:table-cell>
3830                                                                                                        <fo:block>
3831                                                                                                                <fo:basic-link external-destination="url({$url_eth})">C2</fo:basic-link>
3832                                                                                                        </fo:block>
3833                                                                                                        <fo:block>
3834                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:eth/@uom)"><fo:inline>
3835<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:eth/@uom"/>
3836</fo:inline></xsl:if>
3837                                                                                                        </fo:block>
3838                                                                                                </fo:table-cell>
3839                                                                                                <fo:table-cell>
3840                                                                                                        <fo:block>
3841                                                                                                                <fo:basic-link external-destination="url({$url_prop})">C3</fo:basic-link>
3842                                                                                                        </fo:block>
3843                                                                                                        <fo:block>
3844                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:prop/@uom)"><fo:inline>
3845<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:prop/@uom"/>
3846</fo:inline></xsl:if>
3847                                                                                                        </fo:block>
3848                                                                                                </fo:table-cell>
3849                                                                                                <fo:table-cell>
3850                                                                                                        <fo:block>
3851                                                                                                                <fo:basic-link external-destination="url({$url_ibut})">IC4</fo:basic-link>
3852                                                                                                        </fo:block>
3853                                                                                                        <fo:block>
3854                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:ibut/@uom)"><fo:inline>
3855<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:ibut/@uom"/>
3856</fo:inline></xsl:if>
3857                                                                                                        </fo:block>
3858                                                                                                </fo:table-cell>
3859                                                                                                <fo:table-cell>
3860                                                                                                        <fo:block>
3861                                                                                                                <fo:basic-link external-destination="url({$url_ipent})">IC5</fo:basic-link>
3862                                                                                                        </fo:block>
3863                                                                                                        <fo:block>
3864                                                                                                                <xsl:if test="string(/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:ipent/@uom)"><fo:inline>
3865<xsl:value-of select="/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo/witsml:ipent/@uom"/>
3866</fo:inline></xsl:if>
3867                                                                                                        </fo:block>
3868                                                                                                </fo:table-cell>
3869                                                                                        </fo:table-row>
3870                                                                                        <xsl:for-each select="/witsml:drillReports/witsml:drillReport/witsml:gasReadingInfo">
3871<fo:table-row>
3872                                                                                                <fo:table-cell>
3873                                                                                                        <fo:block>
3874                                                                                                                <xsl:if test="string(substring-after(witsml:dTim, 'T'))"><fo:inline>
3875<xsl:value-of select="substring-after(witsml:dTim, 'T')"/>
3876</fo:inline></xsl:if>
3877                                                                                                        </fo:block>
3878                                                                                                </fo:table-cell>
3879                                                                                                <fo:table-cell>
3880                                                                                                        <fo:block>
3881                                                                                                                <xsl:if test="string(witsml:readingType)"><fo:inline>
3882<xsl:value-of select="witsml:readingType"/>
3883</fo:inline></xsl:if>
3884                                                                                                        </fo:block>
3885                                                                                                </fo:table-cell>
3886                                                                                                <fo:table-cell>
3887                                                                                                        <fo:block>
3888                                                                                                                <xsl:if test="string(witsml:mdTop)"><fo:inline>
3889<xsl:value-of select="witsml:mdTop"/>
3890</fo:inline></xsl:if>
3891                                                                                                        </fo:block>
3892                                                                                                </fo:table-cell>
3893                                                                                                <fo:table-cell>
3894                                                                                                        <fo:block>
3895                                                                                                                <xsl:if test="string(witsml:mdBottom)"><fo:inline>
3896<xsl:value-of select="witsml:mdBottom"/>
3897</fo:inline></xsl:if>
3898                                                                                                        </fo:block>
3899                                                                                                </fo:table-cell>
3900                                                                                                <fo:table-cell>
3901                                                                                                        <fo:block>
3902                                                                                                                <xsl:if test="string(witsml:tvdTop)"><fo:inline>
3903<xsl:value-of select="witsml:tvdTop"/>
3904</fo:inline></xsl:if>
3905                                                                                                        </fo:block>
3906                                                                                                </fo:table-cell>
3907                                                                                                <fo:table-cell>
3908                                                                                                        <fo:block>
3909                                                                                                                <xsl:if test="string(witsml:tvdBottom)"><fo:inline>
3910<xsl:value-of select="witsml:tvdBottom"/>
3911</fo:inline></xsl:if>
3912                                                                                                        </fo:block>
3913                                                                                                </fo:table-cell>
3914                                                                                                <fo:table-cell>
3915                                                                                                        <fo:block>
3916                                                                                                                <xsl:if test="string(witsml:gasHigh)"><fo:inline>
3917<xsl:value-of select="witsml:gasHigh"/>
3918</fo:inline></xsl:if>
3919                                                                                                        </fo:block>
3920                                                                                                </fo:table-cell>
3921                                                                                                <fo:table-cell>
3922                                                                                                        <fo:block>
3923                                                                                                                <xsl:if test="string(witsml:gasLow)"><fo:inline>
3924<xsl:value-of select="witsml:gasLow"/>
3925</fo:inline></xsl:if>
3926                                                                                                        </fo:block>
3927                                                                                                </fo:table-cell>
3928                                                                                                <fo:table-cell>
3929                                                                                                        <fo:block>
3930                                                                                                                <xsl:if test="string(witsml:meth)"><fo:inline>
3931<xsl:value-of select="witsml:meth"/>
3932</fo:inline></xsl:if>
3933                                                                                                        </fo:block>
3934                                                                                                </fo:table-cell>
3935                                                                                                <fo:table-cell>
3936                                                                                                        <fo:block>
3937                                                                                                                <xsl:if test="string(witsml:eth)"><fo:inline>
3938<xsl:value-of select="witsml:eth"/>
3939</fo:inline></xsl:if>
3940                                                                                                        </fo:block>
3941                                                                                                </fo:table-cell>
3942                                                                                                <fo:table-cell>
3943                                                                                                        <fo:block>
3944                                                                                                                <xsl:if test="string(witsml:prop)"><fo:inline>
3945<xsl:value-of select="witsml:prop"/>
3946</fo:inline></xsl:if>
3947                                                                                                        </fo:block>
3948                                                                                                </fo:table-cell>
3949                                                                                                <fo:table-cell>
3950                                                                                                        <fo:block>
3951                                                                                                                <xsl:if test="string(witsml:ibut)"><fo:inline>
3952<xsl:value-of select="witsml:ibut"/>
3953</fo:inline></xsl:if>
3954                                                                                                        </fo:block>
3955                                                                                                </fo:table-cell>
3956                                                                                                <fo:table-cell>
3957                                                                                                        <fo:block>
3958                                                                                                                <xsl:if test="string(witsml:ipent)"><fo:inline>
3959<xsl:value-of select="witsml:ipent"/>
3960</fo:inline></xsl:if>
3961                                                                                                        </fo:block>
3962                                                                                                </fo:table-cell>
3963                                                                                        </fo:table-row>
3964</xsl:for-each>
3965                                                                                </fo:table-body>
3966                                                                        </fo:table> </fo:block>
3967                                                        </fo:table-cell>
3968                                                </fo:table-row>
3969                                        </fo:table-body>
3970                                </fo:table>
3971                        </fo:block>
3972                </fo:flow>
3973        </fo:page-sequence>
3974</fo:root>
3975</xsl:template>
3976<!-- ========================= NUMBER FORMATS ========================= -->
3977<!-- ========================= CUSTOM FORMATS ========================= -->
3978<xslt:template name="str:custom-format">
3979<xslt:param name="str" select="''"/>
3980<xslt:param name="pattern" select="''"/>
3981<xslt:param name="crtPos" select="1"/>
3982<xslt:if test="$crtPos &lt;= string-length($pattern)">
3983<xslt:variable name="chr" select="substring(normalize-space($pattern), $crtPos, 1)"/>
3984<xslt:choose>
3985<xslt:when test="$chr = '#'">
3986<xslt:value-of select="substring($str, 1, 1)"/>
3987</xslt:when>
3988<xslt:otherwise>
3989<xslt:value-of select="$chr"/>
3990</xslt:otherwise>
3991</xslt:choose>
3992<xslt:call-template name="str:custom-format">
3993<xslt:with-param name="str">
3994<xslt:choose>
3995<xslt:when test="$chr = '#'">
3996<xslt:value-of select="substring($str, 2)"/>
3997</xslt:when>
3998<xslt:otherwise>
3999<xslt:value-of select="$str"/>
4000</xslt:otherwise>
4001</xslt:choose>
4002</xslt:with-param>
4003<xslt:with-param name="pattern" select="$pattern"/>
4004<xslt:with-param name="crtPos" select="$crtPos + 1"/>
4005</xslt:call-template>
4006</xslt:if>
4007</xslt:template>
4008<!-- ========================= EXSLT TEMPLATES [str.padding.template.xsl] ========================= -->
4009<xslt:template name="str:padding">
4010<xslt:param name="length" select="0"/>
4011<xslt:param name="chars" select="' '"/>
4012<xslt:choose>
4013<xslt:when test="not($length) or not($chars)"/>
4014<xslt:otherwise>
4015<xslt:variable name="string" select="concat($chars, $chars, $chars, $chars, $chars,                                        $chars, $chars, $chars, $chars, $chars)"/>
4016<xslt:choose>
4017<xslt:when test="string-length($string) &gt;= $length">
4018<xslt:value-of select="substring($string, 1, $length)"/>
4019</xslt:when>
4020<xslt:otherwise>
4021<xslt:call-template name="str:padding">
4022<xslt:with-param name="length" select="$length"/>
4023<xslt:with-param name="chars" select="$string"/>
4024</xslt:call-template>
4025</xslt:otherwise>
4026</xslt:choose>
4027</xslt:otherwise>
4028</xslt:choose>
4029</xslt:template>
4030<!-- ========================= EXSLT TEMPLATES [date.format-date.template.xsl] ========================= -->
4031<xslt:template name="date:_get-days-elapsed">
4032<xslt:param name="month"/>
4033<xslt:choose>
4034<xslt:when test="$month = 1">0</xslt:when>
4035<xslt:when test="$month = 2">31</xslt:when>
4036<xslt:when test="$month = 3">59</xslt:when>
4037<xslt:when test="$month = 4">90</xslt:when>
4038<xslt:when test="$month = 5">120</xslt:when>
4039<xslt:when test="$month = 6">151</xslt:when>
4040<xslt:when test="$month = 7">181</xslt:when>
4041<xslt:when test="$month = 8">212</xslt:when>
4042<xslt:when test="$month = 9">243</xslt:when>
4043<xslt:when test="$month = 10">273</xslt:when>
4044<xslt:when test="$month = 11">304</xslt:when>
4045<xslt:when test="$month = 12">334</xslt:when>
4046<xslt:otherwise>365</xslt:otherwise>
4047</xslt:choose>
4048</xslt:template>
4049<xslt:template name="date:_get-month">
4050<xslt:param name="month"/>
4051<xslt:param name="lang-id" select="'en_US'"/>
4052<xslt:choose>
4053<xslt:when test="$lang-id = 'fr_FR'">
4054<xslt:choose>
4055<xslt:when test="$month = 1">Janvier;Jan</xslt:when>
4056<xslt:when test="$month = 2">Février;Fév</xslt:when>
4057<xslt:when test="$month = 3">Mars;Mar</xslt:when>
4058<xslt:when test="$month = 4">Avril;Avr</xslt:when>
4059<xslt:when test="$month = 5">Mai;Mai</xslt:when>
4060<xslt:when test="$month = 6">Juin;Jui</xslt:when>
4061<xslt:when test="$month = 7">Juillet;Juil</xslt:when>
4062<xslt:when test="$month = 8">Août;Aoû</xslt:when>
4063<xslt:when test="$month = 9">Septembre;Sep</xslt:when>
4064<xslt:when test="$month = 10">Octobre;Oct</xslt:when>
4065<xslt:when test="$month = 11">Novembre;Nov</xslt:when>
4066<xslt:when test="$month = 12">Décembre;Déc</xslt:when>
4067</xslt:choose>
4068</xslt:when>
4069<xslt:when test="$lang-id = 'de_AT' or $lang-id = 'de_DE' or $lang-id = 'de_CH'">
4070<xslt:choose>
4071<xslt:when test="$month = 1">Januar;Jan</xslt:when>
4072<xslt:when test="$month = 2">Februar;Feb</xslt:when>
4073<xslt:when test="$month = 3">März;Mär</xslt:when>
4074<xslt:when test="$month = 4">April;Apr</xslt:when>
4075<xslt:when test="$month = 5">Dürfen;Dür</xslt:when>
4076<xslt:when test="$month = 6">Juni;Jun</xslt:when>
4077<xslt:when test="$month = 7">Juli;Jul</xslt:when>
4078<xslt:when test="$month = 8">August;Aug</xslt:when>
4079<xslt:when test="$month = 9">September;Sep</xslt:when>
4080<xslt:when test="$month = 10">Oktober;Okt</xslt:when>
4081<xslt:when test="$month = 11">November;Nov</xslt:when>
4082<xslt:when test="$month = 12">Dezember;Dez</xslt:when>
4083</xslt:choose>
4084</xslt:when>
4085<xslt:when test="$lang-id = 'es_ES'">
4086<xslt:choose>
4087<xslt:when test="$month = 1">Enero;Ene</xslt:when>
4088<xslt:when test="$month = 2">Febrero;Feb</xslt:when>
4089<xslt:when test="$month = 3">Marzo;Mar</xslt:when>
4090<xslt:when test="$month = 4">Abril;Abr</xslt:when>
4091<xslt:when test="$month = 5">Mayo;May</xslt:when>
4092<xslt:when test="$month = 6">Junio;Jun</xslt:when>
4093<xslt:when test="$month = 7">Julio;Jul</xslt:when>
4094<xslt:when test="$month = 8">Agosto;Ago</xslt:when>
4095<xslt:when test="$month = 9">Septiembre;Sep</xslt:when>
4096<xslt:when test="$month = 10">Octubre;Oct</xslt:when>
4097<xslt:when test="$month = 11">Noviembre;Nov</xslt:when>
4098<xslt:when test="$month = 12">Diciembre;Dic</xslt:when>
4099</xslt:choose>
4100</xslt:when>
4101<xslt:when test="$lang-id = 'nl_NL'">
4102<xslt:choose>
4103<xslt:when test="$month = 1">januari;jan</xslt:when>
4104<xslt:when test="$month = 2">februari;feb</xslt:when>
4105<xslt:when test="$month = 3">maart;maa</xslt:when>
4106<xslt:when test="$month = 4">april;apr</xslt:when>
4107<xslt:when test="$month = 5">mei;mei</xslt:when>
4108<xslt:when test="$month = 6">juni;jun</xslt:when>
4109<xslt:when test="$month = 7">juli;jul</xslt:when>
4110<xslt:when test="$month = 8">augustus;aug</xslt:when>
4111<xslt:when test="$month = 9">september;sep</xslt:when>
4112<xslt:when test="$month = 10">oktober;okt</xslt:when>
4113<xslt:when test="$month = 11">november;nov</xslt:when>
4114<xslt:when test="$month = 12">december;dec</xslt:when>
4115</xslt:choose>
4116</xslt:when>
4117<xslt:otherwise>
4118<xslt:choose>
4119<xslt:when test="$month = 1">January;Jan</xslt:when>
4120<xslt:when test="$month = 2">February;Feb</xslt:when>
4121<xslt:when test="$month = 3">March;Mar</xslt:when>
4122<xslt:when test="$month = 4">April;Apr</xslt:when>
4123<xslt:when test="$month = 5">May;May</xslt:when>
4124<xslt:when test="$month = 6">June;Jun</xslt:when>
4125<xslt:when test="$month = 7">July;Jul</xslt:when>
4126<xslt:when test="$month = 8">August;Aug</xslt:when>
4127<xslt:when test="$month = 9">September;Sep</xslt:when>
4128<xslt:when test="$month = 10">October;Oct</xslt:when>
4129<xslt:when test="$month = 11">November;Nov</xslt:when>
4130<xslt:when test="$month = 12">December;Dec</xslt:when>
4131</xslt:choose>
4132</xslt:otherwise>
4133</xslt:choose>
4134</xslt:template>
4135<xslt:template name="date:_get-day">
4136<xslt:param name="day"/>
4137<xslt:param name="lang-id" select="'en_US'"/>
4138<xslt:choose>
4139<xslt:when test="$lang-id = 'fr_FR'">
4140<xslt:choose>
4141<xslt:when test="$day = 1">Dimanche;Dim</xslt:when>
4142<xslt:when test="$day = 2">Lundi;Lun</xslt:when>
4143<xslt:when test="$day = 3">Mardi;Mar</xslt:when>
4144<xslt:when test="$day = 4">Mercredi;Mer</xslt:when>
4145<xslt:when test="$day = 5">Jeudi;Jeu</xslt:when>
4146<xslt:when test="$day = 6">Vendredi;Ven</xslt:when>
4147<xslt:when test="$day = 7">Samedi;Sam</xslt:when>
4148</xslt:choose>
4149</xslt:when>
4150<xslt:when test="$lang-id = 'de_AT' or $lang-id = 'de_DE' or $lang-id = 'de_CH'">
4151<xslt:choose>
4152<xslt:when test="$day = 1">Sonntag;Son</xslt:when>
4153<xslt:when test="$day = 2">Montag;Mon</xslt:when>
4154<xslt:when test="$day = 3">Dienstag;Die</xslt:when>
4155<xslt:when test="$day = 4">Mittwoch;Mit</xslt:when>
4156<xslt:when test="$day = 5">Donnerstag;Don</xslt:when>
4157<xslt:when test="$day = 6">Freitag;Fre</xslt:when>
4158<xslt:when test="$day = 7">Samstag;Sam</xslt:when>
4159</xslt:choose>
4160</xslt:when>
4161<xslt:when test="$lang-id = 'es_ES'">
4162<xslt:choose>
4163<xslt:when test="$day = 1">Domingo;Dom</xslt:when>
4164<xslt:when test="$day = 2">Lunes;Lun</xslt:when>
4165<xslt:when test="$day = 3">Martes;Mar</xslt:when>
4166<xslt:when test="$day = 4">Miércoles;Mié</xslt:when>
4167<xslt:when test="$day = 5">Jueves;Jue</xslt:when>
4168<xslt:when test="$day = 6">Viernes;Vie</xslt:when>
4169<xslt:when test="$day = 7">Sábado;Sáb</xslt:when>
4170</xslt:choose>
4171</xslt:when>
4172<xslt:when test="$lang-id = 'nl_NL'">
4173<xslt:choose>
4174<xslt:when test="$day = 1">zondag;zon</xslt:when>
4175<xslt:when test="$day = 2">maandag;maa</xslt:when>
4176<xslt:when test="$day = 3">dinsdag;din</xslt:when>
4177<xslt:when test="$day = 4">woensdag;woe</xslt:when>
4178<xslt:when test="$day = 5">donderdag;don</xslt:when>
4179<xslt:when test="$day = 6">vrijdag;vri</xslt:when>
4180<xslt:when test="$day = 7">zaterdag;zat</xslt:when>
4181</xslt:choose>
4182</xslt:when>
4183<xslt:otherwise>
4184<xslt:choose>
4185<xslt:when test="$day = 1">Sunday;Sun</xslt:when>
4186<xslt:when test="$day = 2">Monday;Mon</xslt:when>
4187<xslt:when test="$day = 3">Tuesday;Tue</xslt:when>
4188<xslt:when test="$day = 4">Wednesday;Wed</xslt:when>
4189<xslt:when test="$day = 5">Thursday;Thu</xslt:when>
4190<xslt:when test="$day = 6">Friday;Fri</xslt:when>
4191<xslt:when test="$day = 7">Saturday;Sat</xslt:when>
4192</xslt:choose>
4193</xslt:otherwise>
4194</xslt:choose>
4195</xslt:template>
4196<xslt:template name="date:format-date">
4197<xslt:param name="date-time"/>
4198<xslt:param name="pattern"/>
4199<xslt:param name="lang-id"/>
4200<xslt:variable name="formatted">
4201<xslt:choose>
4202<xslt:when test="starts-with($date-time, '---')">
4203<xslt:call-template name="date:_format-date">
4204<xslt:with-param name="year" select="'NaN'"/>
4205<xslt:with-param name="month" select="'NaN'"/>
4206<xslt:with-param name="day" select="number(substring($date-time, 4, 2))"/>
4207<xslt:with-param name="pattern" select="$pattern"/>
4208<xslt:with-param name="lang-id" select="$lang-id"/>
4209</xslt:call-template>
4210</xslt:when>
4211<xslt:when test="starts-with($date-time, '--')">
4212<xslt:call-template name="date:_format-date">
4213<xslt:with-param name="year" select="'NaN'"/>
4214<xslt:with-param name="month" select="number(substring($date-time, 3, 2))"/>
4215<xslt:with-param name="day" select="number(substring($date-time, 6, 2))"/>
4216<xslt:with-param name="pattern" select="$pattern"/>
4217<xslt:with-param name="lang-id" select="$lang-id"/>
4218</xslt:call-template>
4219</xslt:when>
4220<xslt:otherwise>
4221<xslt:variable name="neg" select="starts-with($date-time, '-')"/>
4222<xslt:variable name="no-neg">
4223<xslt:choose>
4224<xslt:when test="$neg or starts-with($date-time, '+')">
4225<xslt:value-of select="substring($date-time, 2)"/>
4226</xslt:when>
4227<xslt:otherwise>
4228<xslt:value-of select="$date-time"/>
4229</xslt:otherwise>
4230</xslt:choose>
4231</xslt:variable>
4232<xslt:variable name="no-neg-length" select="string-length($no-neg)"/>
4233<xslt:variable name="timezone">
4234<xslt:choose>
4235<xslt:when test="substring($no-neg, $no-neg-length) = 'Z'">Z</xslt:when>
4236<xslt:otherwise>
4237<xslt:variable name="tz" select="substring($no-neg, $no-neg-length - 5)"/>
4238<xslt:if test="(substring($tz, 1, 1) = '-' or                                      substring($tz, 1, 1) = '+') and                                    substring($tz, 4, 1) = ':'">
4239<xslt:value-of select="$tz"/>
4240</xslt:if>
4241</xslt:otherwise>
4242</xslt:choose>
4243</xslt:variable>
4244<xslt:if test="not(string($timezone)) or                           $timezone = 'Z' or                            (substring($timezone, 2, 2) &lt;= 23 and                            substring($timezone, 5, 2) &lt;= 59)">
4245<xslt:variable name="dt" select="substring($no-neg, 1, $no-neg-length - string-length($timezone))"/>
4246<xslt:variable name="dt-length" select="string-length($dt)"/>
4247<xslt:choose>
4248<xslt:when test="substring($dt, 3, 1) = ':' and                                   substring($dt, 6, 1) = ':'">
4249<xslt:variable name="hour" select="substring($dt, 1, 2)"/>
4250<xslt:variable name="min" select="substring($dt, 4, 2)"/>
4251<xslt:variable name="sec" select="substring($dt, 7)"/>
4252<xslt:if test="$hour &lt;= 23 and                                    $min &lt;= 59 and                                    $sec &lt;= 60">
4253<xslt:call-template name="date:_format-date">
4254<xslt:with-param name="year" select="'NaN'"/>
4255<xslt:with-param name="month" select="'NaN'"/>
4256<xslt:with-param name="day" select="'NaN'"/>
4257<xslt:with-param name="hour" select="$hour"/>
4258<xslt:with-param name="minute" select="$min"/>
4259<xslt:with-param name="second" select="$sec"/>
4260<xslt:with-param name="timezone" select="$timezone"/>
4261<xslt:with-param name="pattern" select="$pattern"/>
4262<xslt:with-param name="lang-id" select="$lang-id"/>
4263</xslt:call-template>
4264</xslt:if>
4265</xslt:when>
4266<xslt:otherwise>
4267<xslt:variable name="year" select="substring($dt, 1, 4) * (($neg * -2) + 1)"/>
4268<xslt:choose>
4269<xslt:when test="not(number($year))"/>
4270<xslt:when test="$dt-length = 4">
4271<xslt:call-template name="date:_format-date">
4272<xslt:with-param name="year" select="$year"/>
4273<xslt:with-param name="timezone" select="$timezone"/>
4274<xslt:with-param name="pattern" select="$pattern"/>
4275<xslt:with-param name="lang-id" select="$lang-id"/>
4276</xslt:call-template>
4277</xslt:when>
4278<xslt:when test="substring($dt, 5, 1) = '-'">
4279<xslt:variable name="month" select="substring($dt, 6, 2)"/>
4280<xslt:choose>
4281<xslt:when test="not($month &lt;= 12)"/>
4282<xslt:when test="$dt-length = 7">
4283<xslt:call-template name="date:_format-date">
4284<xslt:with-param name="year" select="$year"/>
4285<xslt:with-param name="month" select="$month"/>
4286<xslt:with-param name="timezone" select="$timezone"/>
4287<xslt:with-param name="pattern" select="$pattern"/>
4288<xslt:with-param name="lang-id" select="$lang-id"/>
4289</xslt:call-template>
4290</xslt:when>
4291<xslt:when test="substring($dt, 8, 1) = '-'">
4292<xslt:variable name="day" select="substring($dt, 9, 2)"/>
4293<xslt:if test="$day &lt;= 31">
4294<xslt:choose>
4295<xslt:when test="$dt-length = 10">
4296<xslt:call-template name="date:_format-date">
4297<xslt:with-param name="year" select="$year"/>
4298<xslt:with-param name="month" select="$month"/>
4299<xslt:with-param name="day" select="$day"/>
4300<xslt:with-param name="timezone" select="$timezone"/>
4301<xslt:with-param name="pattern" select="$pattern"/>
4302<xslt:with-param name="lang-id" select="$lang-id"/>
4303</xslt:call-template>
4304</xslt:when>
4305<xslt:when test="substring($dt, 11, 1) = 'T' and                                                        substring($dt, 14, 1) = ':' and                                                        substring($dt, 17, 1) = ':'">
4306<xslt:variable name="hour" select="substring($dt, 12, 2)"/>
4307<xslt:variable name="min" select="substring($dt, 15, 2)"/>
4308<xslt:variable name="sec" select="substring($dt, 18)"/>
4309<xslt:if test="$hour &lt;= 23 and                                                         $min &lt;= 59 and                                                         $sec &lt;= 60">
4310<xslt:call-template name="date:_format-date">
4311<xslt:with-param name="year" select="$year"/>
4312<xslt:with-param name="month" select="$month"/>
4313<xslt:with-param name="day" select="$day"/>
4314<xslt:with-param name="hour" select="$hour"/>
4315<xslt:with-param name="minute" select="$min"/>
4316<xslt:with-param name="second" select="$sec"/>
4317<xslt:with-param name="timezone" select="$timezone"/>
4318<xslt:with-param name="pattern" select="$pattern"/>
4319<xslt:with-param name="lang-id" select="$lang-id"/>
4320</xslt:call-template>
4321</xslt:if>
4322</xslt:when>
4323</xslt:choose>
4324</xslt:if>
4325</xslt:when>
4326</xslt:choose>
4327</xslt:when>
4328<xslt:when test="string(number(substring($dt,5,1)))!='NaN'">
4329<xslt:variable name="month" select="substring($dt, 5, 2)"/>
4330<xslt:choose>
4331<xslt:when test="not($month &lt;= 12)"/>
4332<xslt:when test="$dt-length = 6">
4333<xslt:call-template name="date:_format-date">
4334<xslt:with-param name="year" select="$year"/>
4335<xslt:with-param name="month" select="$month"/>
4336<xslt:with-param name="timezone" select="$timezone"/>
4337<xslt:with-param name="pattern" select="$pattern"/>
4338<xslt:with-param name="lang-id" select="$lang-id"/>
4339</xslt:call-template>
4340</xslt:when>
4341<xslt:otherwise>
4342<xslt:variable name="day" select="substring($dt, 7, 2)"/>
4343<xslt:if test="$day &lt;= 31">
4344<xslt:choose>
4345<xslt:when test="$dt-length = 8">
4346<xslt:call-template name="date:_format-date">
4347<xslt:with-param name="year" select="$year"/>
4348<xslt:with-param name="month" select="$month"/>
4349<xslt:with-param name="day" select="$day"/>
4350<xslt:with-param name="timezone" select="$timezone"/>
4351<xslt:with-param name="pattern" select="$pattern"/>
4352<xslt:with-param name="lang-id" select="$lang-id"/>
4353</xslt:call-template>
4354</xslt:when>
4355<xslt:when test="substring($dt, 9, 1) = 'T' and  substring($dt, 12, 1) = ':' and  substring($dt, 15, 1) = ':'">
4356<xslt:variable name="hour" select="substring($dt, 10, 2)"/>
4357<xslt:variable name="min" select="substring($dt, 13, 2)"/>
4358<xslt:variable name="sec" select="substring($dt, 16)"/>
4359<xslt:if test="$hour &lt;= 23 and                                                         $min &lt;= 59 and                                                         $sec &lt;= 60">
4360<xslt:call-template name="date:_format-date">
4361<xslt:with-param name="year" select="$year"/>
4362<xslt:with-param name="month" select="$month"/>
4363<xslt:with-param name="day" select="$day"/>
4364<xslt:with-param name="hour" select="$hour"/>
4365<xslt:with-param name="minute" select="$min"/>
4366<xslt:with-param name="second" select="$sec"/>
4367<xslt:with-param name="timezone" select="$timezone"/>
4368<xslt:with-param name="pattern" select="$pattern"/>
4369<xslt:with-param name="lang-id" select="$lang-id"/>
4370</xslt:call-template>
4371</xslt:if>
4372</xslt:when>
4373</xslt:choose>
4374</xslt:if>
4375</xslt:otherwise>
4376</xslt:choose>
4377</xslt:when>
4378</xslt:choose>
4379</xslt:otherwise>
4380</xslt:choose>
4381</xslt:if>
4382</xslt:otherwise>
4383</xslt:choose>
4384</xslt:variable>
4385<xslt:value-of select="$formatted"/>
4386</xslt:template>
4387<xslt:template name="date:_format-date">
4388<xslt:param name="year"/>
4389<xslt:param name="month" select="1"/>
4390<xslt:param name="day" select="1"/>
4391<xslt:param name="hour" select="0"/>
4392<xslt:param name="minute" select="0"/>
4393<xslt:param name="second" select="0"/>
4394<xslt:param name="timezone" select="'Z'"/>
4395<xslt:param name="pattern" select="''"/>
4396<xslt:param name="lang-id" select="'en_US'"/>
4397<xslt:variable name="char" select="substring($pattern, 1, 1)"/>
4398<xslt:choose>
4399<xslt:when test="not($pattern)"/>
4400<xslt:when test="$char = &quot;'&quot;">
4401<xslt:choose>
4402<xslt:when test="substring($pattern, 2, 1) = &quot;'&quot;">
4403<xslt:text>'</xslt:text>
4404<xslt:call-template name="date:_format-date">
4405<xslt:with-param name="year" select="$year"/>
4406<xslt:with-param name="month" select="$month"/>
4407<xslt:with-param name="day" select="$day"/>
4408<xslt:with-param name="hour" select="$hour"/>
4409<xslt:with-param name="minute" select="$minute"/>
4410<xslt:with-param name="second" select="$second"/>
4411<xslt:with-param name="timezone" select="$timezone"/>
4412<xslt:with-param name="pattern" select="substring($pattern, 3)"/>
4413<xslt:with-param name="lang-id" select="$lang-id"/>
4414</xslt:call-template>
4415</xslt:when>
4416<xslt:otherwise>
4417<xslt:variable name="literal-value" select="substring-before(substring($pattern, 2), &quot;'&quot;)"/>
4418<xslt:value-of select="$literal-value"/>
4419<xslt:call-template name="date:_format-date">
4420<xslt:with-param name="year" select="$year"/>
4421<xslt:with-param name="month" select="$month"/>
4422<xslt:with-param name="day" select="$day"/>
4423<xslt:with-param name="hour" select="$hour"/>
4424<xslt:with-param name="minute" select="$minute"/>
4425<xslt:with-param name="second" select="$second"/>
4426<xslt:with-param name="timezone" select="$timezone"/>
4427<xslt:with-param name="pattern" select="substring($pattern, string-length($literal-value) + 2)"/>
4428<xslt:with-param name="lang-id" select="$lang-id"/>
4429</xslt:call-template>
4430</xslt:otherwise>
4431</xslt:choose>
4432</xslt:when>
4433<xslt:when test="not(contains('abcdefghjiklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', $char))">
4434<xslt:value-of select="$char"/>
4435<xslt:call-template name="date:_format-date">
4436<xslt:with-param name="year" select="$year"/>
4437<xslt:with-param name="month" select="$month"/>
4438<xslt:with-param name="day" select="$day"/>
4439<xslt:with-param name="hour" select="$hour"/>
4440<xslt:with-param name="minute" select="$minute"/>
4441<xslt:with-param name="second" select="$second"/>
4442<xslt:with-param name="timezone" select="$timezone"/>
4443<xslt:with-param name="pattern" select="substring($pattern, 2)"/>
4444<xslt:with-param name="lang-id" select="$lang-id"/>
4445</xslt:call-template>
4446</xslt:when>
4447<xslt:when test="not(contains('GyMdhHmsSEDFwWakKz', $char))">
4448<xslt:message>
4449              Invalid token in format string: <xslt:value-of select="$char"/></xslt:message>
4450<xslt:call-template name="date:_format-date">
4451<xslt:with-param name="year" select="$year"/>
4452<xslt:with-param name="month" select="$month"/>
4453<xslt:with-param name="day" select="$day"/>
4454<xslt:with-param name="hour" select="$hour"/>
4455<xslt:with-param name="minute" select="$minute"/>
4456<xslt:with-param name="second" select="$second"/>
4457<xslt:with-param name="timezone" select="$timezone"/>
4458<xslt:with-param name="pattern" select="substring($pattern, 2)"/>
4459<xslt:with-param name="lang-id" select="$lang-id"/>
4460</xslt:call-template>
4461</xslt:when>
4462<xslt:otherwise>
4463<xslt:variable name="next-different-char" select="substring(translate($pattern, $char, ''), 1, 1)"/>
4464<xslt:variable name="pattern-length">
4465<xslt:choose>
4466<xslt:when test="$next-different-char">
4467<xslt:value-of select="string-length(substring-before($pattern, $next-different-char))"/>
4468</xslt:when>
4469<xslt:otherwise>
4470<xslt:value-of select="string-length($pattern)"/>
4471</xslt:otherwise>
4472</xslt:choose>
4473</xslt:variable>
4474<xslt:choose>
4475<xslt:when test="$char = 'G'">
4476<xslt:choose>
4477<xslt:when test="string($year) = 'NaN'"/>
4478<xslt:when test="$year &gt; 0">AD</xslt:when>
4479<xslt:otherwise>BC</xslt:otherwise>
4480</xslt:choose>
4481</xslt:when>
4482<xslt:when test="$char = 'M'">
4483<xslt:choose>
4484<xslt:when test="string($month) = 'NaN'"/>
4485<xslt:when test="$pattern-length &gt;= 3">
4486<xslt:variable name="month-node">
4487<xslt:call-template name="date:_get-month">
4488<xslt:with-param name="month" select="number($month)"/>
4489<xslt:with-param name="lang-id" select="$lang-id"/>
4490</xslt:call-template>
4491</xslt:variable>
4492<xslt:choose>
4493<xslt:when test="$pattern-length &gt;= 4">
4494<xslt:value-of select="substring-before(normalize-space($month-node), ';')"/>
4495</xslt:when>
4496<xslt:otherwise>
4497<xslt:value-of select="substring-after(normalize-space($month-node), ';')"/>
4498</xslt:otherwise>
4499</xslt:choose>
4500</xslt:when>
4501<xslt:when test="$pattern-length = 2">
4502<xslt:value-of select="format-number($month, '00')"/>
4503</xslt:when>
4504<xslt:when test="$pattern-length = 1">
4505<xslt:value-of select="format-number($month, '0')"/>
4506</xslt:when>
4507<xslt:otherwise>
4508<xslt:value-of select="$month"/>
4509</xslt:otherwise>
4510</xslt:choose>
4511</xslt:when>
4512<xslt:when test="$char = 'E'">
4513<xslt:choose>
4514<xslt:when test="string($year) = 'NaN' or string($month) = 'NaN' or string($day) = 'NaN'"/>
4515<xslt:otherwise>
4516<xslt:variable name="month-days">
4517<xslt:call-template name="date:_get-days-elapsed">
4518<xslt:with-param name="month" select="number($month)"/>
4519</xslt:call-template>
4520</xslt:variable>
4521<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)"/>
4522<xslt:variable name="y-1" select="$year - 1"/>
4523<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"/>
4524<xslt:variable name="day-node">
4525<xslt:call-template name="date:_get-day">
4526<xslt:with-param name="day" select="number($dow)"/>
4527<xslt:with-param name="lang-id" select="$lang-id"/>
4528</xslt:call-template>
4529</xslt:variable>
4530<xslt:choose>
4531<xslt:when test="$pattern-length &gt;= 4">
4532<xslt:value-of select="substring-before(normalize-space($day-node),';')"/>
4533</xslt:when>
4534<xslt:otherwise>
4535<xslt:value-of select="substring-after(normalize-space($day-node),';')"/>
4536</xslt:otherwise>
4537</xslt:choose>
4538</xslt:otherwise>
4539</xslt:choose>
4540</xslt:when>
4541<xslt:when test="$char = 'a'">
4542<xslt:choose>
4543<xslt:when test="string($hour) = 'NaN'"/>
4544<xslt:when test="$hour &gt;= 12">PM</xslt:when>
4545<xslt:otherwise>AM</xslt:otherwise>
4546</xslt:choose>
4547</xslt:when>
4548<xslt:when test="$char = 'z'">
4549<xslt:choose>
4550<xslt:when test="$timezone = 'Z'">UTC</xslt:when>
4551<xslt:otherwise>
4552                    UTC<xslt:value-of select="$timezone"/></xslt:otherwise>
4553</xslt:choose>
4554</xslt:when>
4555<xslt:otherwise>
4556<xslt:variable name="padding">
4557<xslt:choose>
4558<xslt:when test="$pattern-length &gt; 10">
4559<xslt:call-template name="str:padding">
4560<xslt:with-param name="length" select="$pattern-length"/>
4561<xslt:with-param name="chars" select="'0'"/>
4562</xslt:call-template>
4563</xslt:when>
4564<xslt:otherwise>
4565<xslt:value-of select="substring('0000000000', 1, $pattern-length)"/>
4566</xslt:otherwise>
4567</xslt:choose>
4568</xslt:variable>
4569<xslt:choose>
4570<xslt:when test="$char = 'y'">
4571<xslt:choose>
4572<xslt:when test="string($year) = 'NaN'"/>
4573<xslt:when test="$pattern-length &gt; 2">
4574<xslt:value-of select="format-number($year, $padding)"/>
4575</xslt:when>
4576<xslt:otherwise>
4577<xslt:value-of select="format-number(substring($year, string-length($year) - 1), $padding)"/>
4578</xslt:otherwise>
4579</xslt:choose>
4580</xslt:when>
4581<xslt:when test="$char = 'd'">
4582<xslt:choose>
4583<xslt:when test="string($day) = 'NaN'"/>
4584<xslt:otherwise>
4585<xslt:value-of select="format-number($day, $padding)"/>
4586</xslt:otherwise>
4587</xslt:choose>
4588</xslt:when>
4589<xslt:when test="$char = 'h'">
4590<xslt:variable name="h" select="$hour mod 12"/>
4591<xslt:choose>
4592<xslt:when test="string($hour) = 'NaN'"/>
4593<xslt:when test="$h">
4594<xslt:value-of select="format-number($h, $padding)"/>
4595</xslt:when>
4596<xslt:otherwise>
4597<xslt:value-of select="format-number(12, $padding)"/>
4598</xslt:otherwise>
4599</xslt:choose>
4600</xslt:when>
4601<xslt:when test="$char = 'H'">
4602<xslt:choose>
4603<xslt:when test="string($hour) = 'NaN'"/>
4604<xslt:otherwise>
4605<xslt:value-of select="format-number($hour, $padding)"/>
4606</xslt:otherwise>
4607</xslt:choose>
4608</xslt:when>
4609<xslt:when test="$char = 'k'">
4610<xslt:choose>
4611<xslt:when test="string($hour) = 'NaN'"/>
4612<xslt:when test="$hour">
4613<xslt:value-of select="format-number($hour, $padding)"/>
4614</xslt:when>
4615<xslt:otherwise>
4616<xslt:value-of select="format-number(24, $padding)"/>
4617</xslt:otherwise>
4618</xslt:choose>
4619</xslt:when>
4620<xslt:when test="$char = 'K'">
4621<xslt:choose>
4622<xslt:when test="string($hour) = 'NaN'"/>
4623<xslt:otherwise>
4624<xslt:value-of select="format-number($hour mod 12, $padding)"/>
4625</xslt:otherwise>
4626</xslt:choose>
4627</xslt:when>
4628<xslt:when test="$char = 'm'">
4629<xslt:choose>
4630<xslt:when test="string($minute) = 'NaN'"/>
4631<xslt:otherwise>
4632<xslt:value-of select="format-number($minute, $padding)"/>
4633</xslt:otherwise>
4634</xslt:choose>
4635</xslt:when>
4636<xslt:when test="$char = 's'">
4637<xslt:choose>
4638<xslt:when test="string($second) = 'NaN'"/>
4639<xslt:otherwise>
4640<xslt:value-of select="format-number($second, $padding)"/>
4641</xslt:otherwise>
4642</xslt:choose>
4643</xslt:when>
4644<xslt:when test="$char = 'S'">
4645<xslt:choose>
4646<xslt:when test="string($second) = 'NaN'"/>
4647<xslt:otherwise>
4648<xslt:value-of select="format-number(substring-after($second, '.'), $padding)"/>
4649</xslt:otherwise>
4650</xslt:choose>
4651</xslt:when>
4652<xslt:when test="$char = 'F'">
4653<xslt:choose>
4654<xslt:when test="string($day) = 'NaN'"/>
4655<xslt:otherwise>
4656<xslt:value-of select="floor($day div 7) + 1"/>
4657</xslt:otherwise>
4658</xslt:choose>
4659</xslt:when>
4660<xslt:when test="string($year) = 'NaN' or string($month) = 'NaN' or string($day) = 'NaN'"/>
4661<xslt:otherwise>
4662<xslt:variable name="month-days">
4663<xslt:call-template name="date:_get-days-elapsed">
4664<xslt:with-param name="month" select="number($month)"/>
4665</xslt:call-template>
4666</xslt:variable>
4667<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)"/>
4668<xslt:choose>
4669<xslt:when test="$char = 'D'">
4670<xslt:value-of select="format-number($days, $padding)"/>
4671</xslt:when>
4672<xslt:when test="$char = 'w'">
4673<xslt:call-template name="date:_week-in-year">
4674<xslt:with-param name="days" select="$days"/>
4675<xslt:with-param name="year" select="$year"/>
4676</xslt:call-template>
4677</xslt:when>
4678<xslt:when test="$char = 'W'">
4679<xslt:variable name="y-1" select="$year - 1"/>
4680<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"/>
4681<xslt:choose>
4682<xslt:when test="($day - $day-of-week) mod 7">
4683<xslt:value-of select="floor(($day - $day-of-week) div 7) + 2"/>
4684</xslt:when>
4685<xslt:otherwise>
4686<xslt:value-of select="floor(($day - $day-of-week) div 7) + 1"/>
4687</xslt:otherwise>
4688</xslt:choose>
4689</xslt:when>
4690</xslt:choose>
4691</xslt:otherwise>
4692</xslt:choose>
4693</xslt:otherwise>
4694</xslt:choose>
4695<xslt:call-template name="date:_format-date">
4696<xslt:with-param name="year" select="$year"/>
4697<xslt:with-param name="month" select="$month"/>
4698<xslt:with-param name="day" select="$day"/>
4699<xslt:with-param name="hour" select="$hour"/>
4700<xslt:with-param name="minute" select="$minute"/>
4701<xslt:with-param name="second" select="$second"/>
4702<xslt:with-param name="timezone" select="$timezone"/>
4703<xslt:with-param name="pattern" select="substring($pattern, $pattern-length + 1)"/>
4704<xslt:with-param name="lang-id" select="$lang-id"/>
4705</xslt:call-template>
4706</xslt:otherwise>
4707</xslt:choose>
4708</xslt:template>
4709<xslt:template name="date:_week-in-year">
4710<xslt:param name="days"/>
4711<xslt:param name="year"/>
4712<xslt:variable name="y-1" select="$year - 1"/>
4713<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"/>
4714<xslt:variable name="dow">
4715<xslt:choose>
4716<xslt:when test="$day-of-week">
4717<xslt:value-of select="$day-of-week"/>
4718</xslt:when>
4719<xslt:otherwise>7</xslt:otherwise>
4720</xslt:choose>
4721</xslt:variable>
4722<xslt:variable name="start-day" select="($days - $dow + 7) mod 7"/>
4723<xslt:variable name="week-number" select="floor(($days - $dow + 7) div 7)"/>
4724<xslt:choose>
4725<xslt:when test="$start-day &gt;= 4">
4726<xslt:value-of select="$week-number + 1"/>
4727</xslt:when>
4728<xslt:otherwise>
4729<xslt:choose>
4730<xslt:when test="not($week-number)">
4731<xslt:call-template name="date:_week-in-year">
4732<xslt:with-param name="days" select="365 + ((not($y-1 mod 4) and $y-1 mod 100) or not($y-1 mod 400))"/>
4733<xslt:with-param name="year" select="$y-1"/>
4734</xslt:call-template>
4735</xslt:when>
4736<xslt:otherwise>
4737<xslt:value-of select="$week-number"/>
4738</xslt:otherwise>
4739</xslt:choose>
4740</xslt:otherwise>
4741</xslt:choose>
4742</xslt:template>
4743<!-- ========================= END OF STYLESHEET ========================= -->
4744</xslt:stylesheet>
Note: See TracBrowser for help on using the browser.