Project

General

Profile

1
<?xml version="1.0" encoding="UTF-8"?>
2
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ds="http://tempuri.org/dsNVS.xsd" xmlns:dwg="http://rs.tdwg.org/dwc/geospatial" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  >
3
	<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
4
	<xsl:template match="/">
5
		<vegX>
6
			<!--Overall structure-->
7
			<!--<xsl:attribute name="xsi:noNamespaceSchemaLocation" namespace="http://www.w3.org/2001/XMLSchema-instance"><xsl:value-of select="'C:\Development\VegX\VegX 1.5.2/veg.xsd'"/></xsl:attribute>-->
8
			<projects>
9
				<xsl:apply-templates select="//ds:Project"/>
10
			</projects>
11
			<plots>
12
				<xsl:apply-templates select="//ds:Plot"/>
13
			</plots>
14
			<plotObservations>
15
				<xsl:apply-templates select="//ds:PlotObs"/>
16
			</plotObservations>
17
			<taxonNameUsageConcepts>
18
				<xsl:apply-templates select="//ds:Taxon"/>
19
			</taxonNameUsageConcepts>
20
			<aggregateOrganismObservations>
21
				<xsl:apply-templates select="//ds:TaxonCategoryValue"/>
22
				<xsl:apply-templates select="//ds:TaxonSimpleValue"/>
23
				<xsl:apply-templates select="//ds:TaxonBrowse"/>
24
				<xsl:apply-templates select="//ds:TaxonPercentageCover"/>
25
			</aggregateOrganismObservations>
26
			<strata>
27
				<xsl:apply-templates select="//ds:TierMeasurementCategory"/>
28
			</strata>
29
			<stratumObservations>
30
				<xsl:apply-templates select="//ds:Tier"/>
31
			</stratumObservations>
32
			<individualOrganismObservations>
33
				<xsl:apply-templates select="//ds:Diameter"/>
34
				<xsl:apply-templates select="//ds:OrthogonalWidth"/>
35
			</individualOrganismObservations>
36
			<individualOrganisms>
37
				<xsl:apply-templates select="//ds:Item"/>
38
			</individualOrganisms>
39
			<attributes>
40
				<attribute><!--Need an attribute for canopy (tree) height-->
41
					<xsl:attribute name="id">tree</xsl:attribute>
42
					<qualitative>
43
					<methodID>
44
					</methodID>
45
						<code>tree</code>
46
					</qualitative>
47
				</attribute>
48
				<xsl:apply-templates select="//ds:MeasurementCategory"/>
49
				<xsl:apply-templates select="//ds:MeasurementUnit"/>
50
			</attributes>	
51
			<methods>
52
				<xsl:apply-templates select="//ds:Measurement"/>
53
			</methods>
54
			<protocols>
55
				<xsl:apply-templates select="//ds:Method"/>
56
			</protocols>
57
			
58
		</vegX>
59
	</xsl:template>
60
	
61
	<xsl:template match="ds:Method">
62
		<!--A NVS Method corresponds to a VegX Protocol-->
63
		<protocol>
64
			<xsl:attribute name="id"><xsl:value-of select="ds:MethodID"/></xsl:attribute>
65
			<name>
66
				<xsl:value-of select="ds:MethodName"/>
67
			</name>
68
			<citationID/>
69
			<partyWithRole/>
70
		</protocol>
71
	</xsl:template>
72
	<xsl:template match="ds:Measurement">
73
		<!--A NVS Measurement (plus associated measure and technique info) corresponds to a VegX Method-->
74
		<method>
75
			<xsl:attribute name="id"><xsl:value-of select="ds:MeasurementID"/></xsl:attribute>
76
			<description>Measure:<xsl:value-of select="ds:MeasureName"/>  using Technique:<xsl:value-of select="ds:TechniqueName"/>
77
			</description>
78
			<protocolID>
79
				<xsl:value-of select="ds:MethodID"/>
80
			</protocolID>
81
			<name>
82
				<xsl:value-of select="ds:MeasureName"/>_<xsl:value-of select="ds:TechniqueName"/>
83
			</name>
84
		</method>
85
	</xsl:template>
86
	<xsl:template match="ds:MeasurementUnit">
87
		<xsl:if test="ds:Units!=''">
88

    
89
		<!--A NVS MeasurementUnit which has units corresponds to a VegX qualitative Attribute-->
90
			<attribute>
91
				<xsl:attribute name="id">MU<xsl:value-of select="ds:MeasurementUnitID"/></xsl:attribute>
92
				<quantitative>
93
					<methodID>
94
							<xsl:value-of select="ds:MeasurementID"/>
95
					</methodID>
96
					<unit>
97
						<xsl:value-of select="ds:Units"/>
98
					</unit>
99
				</quantitative>
100
			</attribute>
101
		</xsl:if>
102
	</xsl:template>
103
	<xsl:template match="ds:MeasurementCategory">
104
		<!--A NVS MeasurementCategory corresponds to a VegX ordinal or qualitative Attribute-->
105
		<attribute>
106
			<xsl:attribute name="id">MC<xsl:value-of select="ds:MeasurementCategoryID"/></xsl:attribute>
107
			<xsl:choose>
108
				<xsl:when test="ds:CategoryUnits!=''">
109
					<ordinal>
110
						<code>
111
							<xsl:value-of select="ds:CategoryDisplayText"/>
112
						</code>
113
						<methodID>
114
							<xsl:value-of select="ds:MeasurementID"/>
115
						</methodID>
116
						<definition>
117
							<xsl:value-of select="ds:CategoryDescription"/>
118
						</definition>
119
						<upperLimit>
120
							<xsl:value-of select="ds:CategoryUpperBound"/>
121
						</upperLimit>
122
						<lowerLimit>
123
							<xsl:value-of select="ds:CategoryLowerBound"/>
124
						</lowerLimit>
125
						<order>
126
							<xsl:value-of select="ds:MeasurementCategoryIndex"/>
127
						</order>
128
					</ordinal>
129
				</xsl:when>
130
				<xsl:when test="ds:CategoryUnits=''">
131
					<qualitative>
132
						<methodID>
133
							<xsl:value-of select="ds:MeasurementID"/>
134
						</methodID>
135
						<code>
136
							<xsl:value-of select="ds:CategoryDisplayText"/>
137
						</code>
138
					</qualitative>
139
				</xsl:when>
140
			</xsl:choose>
141
		</attribute>
142
	</xsl:template>
143
	
144
	<xsl:template name="GetTechniqueNonSample">
145
		<!--Used to give a technique name to describe a set of code values-->
146
		<!--For plot and other non-sample method measurements-->
147
		<xsl:param name="ThisProjectID"/>
148
		<xsl:param name="ThisMeasureTypeID"/>
149
		<xsl:for-each select="//ds:SampleMeasure[ds:ProjectID=$ThisProjectID] ">
150
		<xsl:variable name="ID"><xsl:value-of select="ds:MeasurementUnitID"/></xsl:variable>
151
			<xsl:for-each select="//ds:MeasurementUnit[ds:MeasurementUnitID=$ID and ds:MeasureTypeID=$ThisMeasureTypeID]">
152
				<xsl:value-of select="ds:TechniqueName"/>
153
			</xsl:for-each>
154
		</xsl:for-each>
155
	</xsl:template>
156
	
157
	<xsl:template name="GetTechniqueNoProject">
158
		<!--Used to give a technique name to describe a set of code values-->
159
		<!--For plot method measurements-->
160
		<xsl:param name="ThisMeasurementCategoryID"/>
161
		<xsl:for-each select="//ds:MeasurementCategory[ds:MeasurementCategoryID=$ThisMeasurementCategoryID] ">
162
				<xsl:value-of select="ds:TechniqueName"/>
163
		</xsl:for-each>
164
	</xsl:template>
165
	
166
	<xsl:template name="GetTechniqueSample">
167
		<!--Used to give a technique name to describe a set of code values-->
168
		<!--For measurements within a Sample Method (eg Recce)-->
169
		<xsl:param name="ThisSampleMethodID"/>
170
		<xsl:param name="ThisMeasureTypeID"/>
171
		<xsl:for-each select="//ds:SampleMeasure[ds:SampleMethodID=$ThisSampleMethodID] ">
172
		<xsl:variable name="ID"><xsl:value-of select="ds:MeasurementUnitID"/></xsl:variable>
173
			<xsl:for-each select="//ds:MeasurementUnit[ds:MeasurementUnitID=$ID and ds:MeasureTypeID=$ThisMeasureTypeID]">
174
				<xsl:value-of select="ds:TechniqueName"/>
175
			</xsl:for-each>
176
		</xsl:for-each>
177
	</xsl:template>
178
	
179
	<xsl:template name="GetMeasurementCategoryText">
180
		<!--Used to give a a category's text, where VegX does not store an AttributeID-->
181
		<xsl:param name="ThisMeasurementCategoryID"/>
182
		<xsl:for-each select="//ds:MeasurementCategory[ds:MeasurementCategoryID=$ThisMeasurementCategoryID] ">
183
				<xsl:value-of select="ds:CategoryDisplayText"/>
184
		</xsl:for-each>
185
	</xsl:template>
186
	
187
	
188
	<xsl:template name="GetMeasurementUnitIDSample">
189
		<!--Used to give a VegX AttributeID (a NVS MeasurementUnitID) to describe units of measurement-->
190
		<!--For measurements within a Sample Method (eg Recce)-->
191
		<xsl:param name="ThisSampleMethodID"/>
192
		<xsl:param name="ThisMeasureTypeID"/>
193
		<xsl:for-each select="//ds:SampleMeasure[ds:SampleMethodID=$ThisSampleMethodID]">
194
			<xsl:variable name="ID"><xsl:value-of select="ds:MeasurementUnitID"/></xsl:variable>
195
			<xsl:for-each select="//ds:MeasurementUnit[ds:MeasurementUnitID=$ID and ds:MeasureTypeID=$ThisMeasureTypeID]">MU<xsl:value-of select="ds:MeasurementUnitID"/>
196
			</xsl:for-each>
197
		</xsl:for-each>
198
	</xsl:template>
199
	
200
	<xsl:template name="GetMeasurementUnitIDNonSample">
201
		<!--Used to give a VegX MethodID (a NVS MeasurementUnitID) to describe how something was measured-->
202
		<!--For plot and other non-sample method measurements-->
203
		<xsl:param name="ThisProjectID"/>
204
		<xsl:param name="ThisMeasureTypeID"/>
205
		<xsl:for-each select="//ds:SampleMeasure[ds:ProjectID=$ThisProjectID]">
206
			<xsl:variable name="ID"><xsl:value-of select="ds:MeasurementUnitID"/></xsl:variable>
207
			<xsl:for-each select="//ds:MeasurementUnit[ds:MeasurementUnitID=$ID and ds:MeasureTypeID=$ThisMeasureTypeID]">
208
				MU<xsl:value-of select="ds:MeasurementUnitID"/>
209
			</xsl:for-each>
210
		</xsl:for-each>
211
	</xsl:template>
212
	
213
	<xsl:template name="GetMeasurementIDSample">
214
		<!--Used to give a VegX MethodID (a NVS MeasurementID) to describe how something was measured-->
215
		<!--For measurements within a Sample Method (eg Recce)-->
216
		<xsl:param name="ThisSampleMethodID"/>
217
		<xsl:param name="ThisMeasureTypeID"/>
218
		<xsl:for-each select="//ds:SampleMeasure[ds:SampleMethodID=$ThisSampleMethodID] ">
219
			<xsl:variable name="ID"><xsl:value-of select="ds:MeasurementUnitID"/></xsl:variable>
220
			<xsl:for-each select="//ds:MeasurementUnit[ds:MeasurementUnitID=$ID and ds:MeasureTypeID=$ThisMeasureTypeID]">
221
				<xsl:value-of select="ds:MeasurementID"/>
222
			</xsl:for-each>
223
		</xsl:for-each>
224
	</xsl:template>
225
	
226
		<xsl:template name="GetMeasurementIDNonSample">
227
		<!--Used to give a VegX MethodID (a NVS MeasurementID) to describe how something was measured-->
228
		<!--For plot and other non-sample method measurements-->
229
		<xsl:param name="ThisProjectID"/>
230
		<xsl:param name="ThisMeasureTypeID"/>
231
		<xsl:for-each select="//ds:SampleMeasure[ds:ProjectID=$ThisProjectID] ">
232
			<xsl:variable name="ID"><xsl:value-of select="ds:MeasurementUnitID"/></xsl:variable>
233
			<xsl:for-each select="//ds:MeasurementUnit[ds:MeasurementUnitID=$ID and ds:MeasureTypeID=$ThisMeasureTypeID]">
234
				<xsl:value-of select="ds:MeasurementID"/>
235
			</xsl:for-each>
236
		</xsl:for-each>
237
	</xsl:template>
238
	
239
	
240
	
241
	<xsl:template name="Notes">
242
		<!--Notes are associated with various types of entity-->
243
		<xsl:param name="NoteObjectTypeName"/>
244
		<xsl:param name="NoteObjectID"/>
245
		<xsl:for-each select="//ds:Note[ds:NoteObjectTypeName=$NoteObjectTypeName  and  ds:NoteObjectID=$NoteObjectID]">
246
			<!--No Notes collection in VegX, just multiple notes-->
247
			<note>
248
				<text>
249
					<xsl:value-of select="ds:Note"/>
250
				</text>
251
				<xsl:if test="ds:NoteDate!=''">
252
					<date>
253
						<xsl:value-of select="ds:NoteDate"/>
254
					</date>
255
				</xsl:if>
256
				<xsl:if test="ds:Type!=''">
257
					<type>
258
						<xsl:value-of select="ds:Type"/>
259
					</type>
260
				</xsl:if>
261
			</note>
262
		</xsl:for-each>
263
	</xsl:template>
264
	<xsl:template match="ds:Project">
265
		<project>
266
			<xsl:attribute name="id"><xsl:value-of select="ds:ProjectID"/></xsl:attribute>
267
			<title>
268
				<xsl:value-of select="ds:ProjectName"/>
269
			</title>
270
			<personnel/>
271
			<xsl:if test="ds:ProjectDescription!=''">
272
				<designDescription>
273
					<description>
274
						<xsl:value-of select="ds:ProjectDescription"/>
275
					</description>
276
				</designDescription>
277
			</xsl:if>
278
			<!--No Project notes in VegX schema?-->
279
			<!--<xsl:call-template name = "Notes"> 
280
                <xsl:with-param name = "NoteObjectTypeName">Project</xsl:with-param> 
281
                <xsl:with-param name = "NoteObjectID"><xsl:value-of select="ds:ProjectID"/></xsl:with-param> 
282
            </xsl:call-template> -->
283
		</project>
284
	</xsl:template>
285
	<xsl:template match="ds:Plot">
286
		<plot>
287
			<!--Why does a plot have an ID attribute as well as a plotUniqueidentifier?-->
288
			<!--xsl:attribute name="id"><xsl:value-of select="ds:PlotID"/></xsl:attribute-->
289
			<plotUniqueIdentifier>
290
				<xsl:value-of select="ds:PlotID"/>
291
			</plotUniqueIdentifier>
292
			<plotName>
293
				<xsl:value-of select="ds:PlotName"/>
294
			</plotName>
295
			<xsl:if test="ds:PlotLocationDescription!=''">
296
				<locationNarrative>
297
					<xsl:value-of select="ds:PlotLocationDescription"/>
298
				</locationNarrative>
299
			</xsl:if>
300
			<xsl:if test="ds:PlotID!=ds:ParentPlotID and ds:ParentPlotID !=-1">
301
				<relatedPlot>
302
					<relatedPlot>
303
					<relatedPlotID>
304
						<xsl:value-of select="ds:ParentPlotID"/>
305
					</relatedPlotID>
306
					<plotRelationship>Nested</plotRelationship>
307
				</relatedPlot>	</relatedPlot>
308
			</xsl:if>
309
			<xsl:call-template name="Notes">
310
				<xsl:with-param name="NoteObjectTypeName">Plot</xsl:with-param>
311
				<xsl:with-param name="NoteObjectID">
312
					<xsl:value-of select="ds:PlotID"/>
313
				</xsl:with-param>
314
			</xsl:call-template>
315
			<xsl:if test="ds:PlacementMeasurementCategoryID">
316
				<placementMethod>
317
				<xsl:call-template name="GetMeasurementCategoryText">
318
				<xsl:with-param name="ThisMeasurementCategoryID">
319
					<xsl:value-of select="ds:PlacementMeasurementCategoryID"/>
320
				</xsl:with-param>
321
				</xsl:call-template>
322
				</placementMethod>
323
			</xsl:if>
324
			<xsl:if test="ds:PlotID=ds:ParentPlotID">
325
				<!--Only parent plots have coordinates in NVS-->
326
				<geospatial>
327
					<xsl:call-template name="Coordinates">
328
						<xsl:with-param name="ThisPlotID">
329
							<xsl:value-of select="ds:PlotID"/>
330
						</xsl:with-param>
331
						<xsl:with-param name="PlotAltitude">
332
							<xsl:value-of select="ds:PlotAltitude"/>
333
						</xsl:with-param>
334
					</xsl:call-template>
335
				</geospatial>
336
			</xsl:if>
337
			<xsl:if test="ds:PlotArea">
338
				<area>
339
					<value>
340
						<xsl:value-of select="ds:PlotArea"/>
341
					</value>
342
					<attributeID>MU<xsl:value-of select="ds:AreaMeasurementUnitID"/></attributeID>
343
				</area>
344
			</xsl:if>
345
			<xsl:if test="ds:ShapeMeasurementCategoryID">
346
				<shape>
347
				<xsl:call-template name="GetMeasurementCategoryText">
348
				<xsl:with-param name="ThisMeasurementCategoryID">
349
					<xsl:value-of select="ds:ShapeMeasurementCategoryID"/>
350
				</xsl:with-param>
351
				</xsl:call-template>
352
				</shape>
353
			</xsl:if>
354
			<xsl:if test="ds:PlotRectangleLength01 or ds:PlotRectangleLength02">
355
				<plotDimension>
356
					<xsl:if test="ds:RectangleLength01">
357
						<length>
358
							<attributeID>MU<xsl:value-of select="ds:LengthMeasurementUnitID"/></attributeID>
359
							<value>
360
								<xsl:value-of select="ds:PlotRectangleLength01"/>
361
							</value>
362
						</length>
363
					</xsl:if>
364
					<xsl:if test="ds:RectangleLength02">
365
						<width>
366
							<attributeID>MU<xsl:value-of select="ds:LengthMeasurementUnitID"/></attributeID>
367
							<value>
368
								<xsl:value-of select="ds:PlotRectangleLength02"/>
369
							</value>
370
						</width>
371
					</xsl:if>
372
				</plotDimension>
373
			</xsl:if>
374
			<xsl:if test="ds:Radius">
375
				<radius>
376
					<attributeID>MU<xsl:value-of select="ds:RadiusMeasurementUnitID"/></attributeID>
377
					<value>
378
						<xsl:value-of select="ds:PlotRadius"/>
379
					</value>
380
				</radius>
381
			</xsl:if>
382
			<xsl:if test="ds:Aspect">
383
				<slopeAspect>
384
					<slopeAspectMeasurement>
385
						<attributeID>MU<xsl:value-of select="ds:AspectMeasurementUnitID"/></attributeID>
386
						<value>
387
							<xsl:value-of select="ds:PlotAspect"/>
388
						</value>
389
					</slopeAspectMeasurement>
390
				</slopeAspect>
391
			</xsl:if>
392
			<xsl:if test="ds:Slope">
393
				<slopeGradient>
394
					<attributeID>MU<xsl:value-of select="ds:SlopeMeasurementUnitID"/></attributeID>
395
					<value>
396
						<xsl:value-of select="ds:PlotSlope"/>
397
					</value>
398
				</slopeGradient>
399
			</xsl:if>
400
			<xsl:if test="ds:ParentMaterialMeasurementCategoryID">
401
				<geology>
402
					<rockType>
403
							<xsl:call-template name="GetMeasurementCategoryText">
404
							<xsl:with-param name="ThisMeasurementCategoryID">
405
								<xsl:value-of select="ds:ParentMaterialMeasurementCategoryID"/>
406
							</xsl:with-param>
407
							</xsl:call-template>
408
					</rockType>
409
					<geologicalSchema>
410
							<xsl:call-template name="GetTechniqueNoProject">
411
							<xsl:with-param name="ThisMeasurementCategoryID">
412
								<xsl:value-of select="ds:ParentMaterialMeasurementCategoryID"/>
413
							</xsl:with-param>
414
							</xsl:call-template>
415
					</geologicalSchema>
416
				</geology>
417
			</xsl:if>
418
			<xsl:if test="ds:LandformMeasurementCategoryID">
419
				<landform>
420
						<xsl:call-template name="GetMeasurementCategoryText">
421
						<xsl:with-param name="ThisMeasurementCategoryID">
422
							<xsl:value-of select="ds:LandformMeasurementCategoryID"/>
423
						</xsl:with-param>
424
						</xsl:call-template>
425
				</landform>
426
			</xsl:if>
427
		</plot>
428
	</xsl:template>
429
	<xsl:template name="Coordinates">
430
		<!--Called from ds:Plot to give coordinates for a particular Plot-->
431
		<xsl:param name="ThisPlotID"/>
432
		<xsl:param name="PlotAltitude"/>
433
		<xsl:for-each select="//ds:PlotObs[ds:PlotID=$ThisPlotID]">
434
		<xsl:variable name="PlotObsID"><xsl:value-of select="ds:PlotObsID"/></xsl:variable>
435
		<xsl:for-each select="//ds:AbsoluteCoord[ds:PlotObsID=$PlotObsID]">
436
			<xsl:sort select="Priority" order="descending"/>
437
			<xsl:if test="position()=1">
438
				
439
				<xsl:choose>
440
					<xsl:when test="ds:Type='Geographic Coordinate (lat/long)'">
441
						<DecimalLatitude>
442
							<xsl:value-of select="ds:YNorthLat"/>
443
						</DecimalLatitude>
444
						<DecimalLongitude>
445
							<xsl:value-of select="ds:XEastLong"/>
446
						</DecimalLongitude>
447
					</xsl:when>
448
				</xsl:choose>
449
				<GeodeticDatum>
450
					<xsl:call-template name="GetMeasurementCategoryText">
451
							<xsl:with-param name="ThisMeasurementCategoryID">
452
								<xsl:value-of select="ds:DatumMeasurementCategoryID"/>
453
							</xsl:with-param>
454
							</xsl:call-template>
455
				</GeodeticDatum>
456
				<verbatimElevation><xsl:value-of select="$PlotAltitude"/></verbatimElevation>
457
				<xsl:choose>
458
					<xsl:when test="ds:MapsheetMeasurementCategoryID">
459
						<gridCoordinateSystemName>
460
							<xsl:call-template name="GetMeasurementCategoryText">
461
							<xsl:with-param name="ThisMeasurementCategoryID">
462
								<xsl:value-of select="ds:MapSeriesMeasurementCategoryID"/>
463
							</xsl:with-param>
464
							</xsl:call-template>
465
						</gridCoordinateSystemName>
466
						<xsl:text disable-output-escaping="yes">&#10;      </xsl:text>
467
						<!--New line-->
468
						<gridCode>
469
							<xsl:call-template name="GetMeasurementCategoryText">
470
							<xsl:with-param name="ThisMeasurementCategoryID">
471
								<xsl:value-of select="ds:MapsheetMeasurementCategoryID"/>
472
							</xsl:with-param>
473
							</xsl:call-template>
474
						</gridCode>
475
					<xsl:text disable-output-escaping="yes">&#10;      </xsl:text>
476
						<!--New line-->
477
					</xsl:when>
478
					<xsl:when test="ds:AbsoluteCoordXEastLong">
479
						<authorEastCoordinate>
480
							<xsl:value-of select="ds:AbsoluteCoordXEastLong"/>
481
						</authorEastCoordinate>
482
						<!--New line-->
483
						<authorNorthCoordinate>
484
							<xsl:value-of select="ds:AbsoluteCoordYNorthLat"/>
485
						</authorNorthCoordinate>
486
					</xsl:when>
487
				</xsl:choose>
488
			</xsl:if>
489
		<!--	<xsl:text disable-output-escaping="yes">&#10;      </xsl:text> -->
490
		<!--New line-->
491
		</xsl:for-each>
492
		</xsl:for-each>
493
		<xsl:text disable-output-escaping="yes">&#10;</xsl:text>
494
		<!--New line-->
495
	</xsl:template>
496
	<xsl:template match="ds:PlotObs">
497
		<plotObservation>
498
			<!--Nowhere to put NVS PlotObsCurrentname-->
499
			<xsl:attribute name="id"><xsl:value-of select="ds:PlotObsID"/></xsl:attribute>
500
			<plotUniqueIdentifierID>
501
				<xsl:value-of select="ds:PlotID"/>
502
			</plotUniqueIdentifierID>
503
			<!--Start date is not optional in schema, StartDate field uses ProjectStartDate if PlotObsStartDate is missing -->
504
			<obsStartDate>
505
				<xsl:value-of select="ds:PlotObsStartDate"/>
506
			</obsStartDate>
507
			<xsl:if test="ds:PlotObsStopDate!=''">
508
				<obsEndDate>
509
					<xsl:value-of select="ds:PlotObsStopDate"/>
510
				</obsEndDate>
511
			</xsl:if>
512
			<projectID>
513
				<xsl:value-of select="ds:ProjectID"/>
514
			</projectID>
515
			<xsl:call-template name="Notes">
516
				<xsl:with-param name="NoteObjectTypeName">PlotObservation</xsl:with-param>
517
				<xsl:with-param name="NoteObjectID">
518
					<xsl:value-of select="ds:PlotObsID"/>
519
				</xsl:with-param>
520
			</xsl:call-template>
521
			<xsl:if test="ds:PlotObsID=ds:ParentPlotObsID or ds:ParentPlotObsID =-1">
522
				<surfaceCover>
523
					<methodID>
524
						<xsl:call-template name="GetMeasurementIDNonSample">
525
							<xsl:with-param name="ThisProjectID">
526
								<xsl:value-of select="ds:ProjectID"/>
527
							</xsl:with-param>
528
							<!--NVSClassLibrary.EMeasureType.GroundCoverCategory=91-->
529
							<xsl:with-param name="ThisMeasureTypeID">91</xsl:with-param>
530
						</xsl:call-template>
531
					</methodID>
532
					<xsl:call-template name="GroundCovers">
533
						<xsl:with-param name="ThisPlotObsID">
534
							<xsl:value-of select="ds:PlotObsID"/>
535
						</xsl:with-param>
536
					</xsl:call-template>
537
				</surfaceCover>
538
			</xsl:if>
539
			<xsl:if test="ds:PlotObsCanopyPercentage">
540
				<vegetationCover>
541
					<methodID>
542
						<xsl:call-template name="GetMeasurementIDNonSample">
543
							<xsl:with-param name="ThisProjectID">
544
								<xsl:value-of select="ds:ProjectID"/>
545
							</xsl:with-param>
546
							<!--NVSClassLibrary.EMeasureType.PlotObservationCanopy=11-->
547
							<xsl:with-param name="ThisMeasureTypeID">11</xsl:with-param>
548
						</xsl:call-template>
549
					</methodID>
550
					<cover>
551
						<coverTypeAttributeID>tree</coverTypeAttributeID>
552
						<coverPercent>
553
							<value>
554
								<xsl:value-of select="ds:PlotObsCanopyPercentage"/>
555
							</value>
556
						</coverPercent>
557
					</cover>
558
				</vegetationCover>
559
			</xsl:if>
560
			<xsl:if test="ds:PlotObsMeanTopHeight">
561
				<vegetationStructure>
562
					<methodID>
563
						<xsl:call-template name="GetMeasurementIDNonSample">
564
							<xsl:with-param name="ThisProjectID">
565
								<xsl:value-of select="ds:ProjectID"/>
566
							</xsl:with-param>
567
							<!--NVSClassLibrary.EMeasureType.HeightMeasurementMethod=37-->
568
							<xsl:with-param name="ThisMeasureTypeID">37</xsl:with-param>
569
						</xsl:call-template>
570
					</methodID>
571
					<structure>
572
						<vegetationComponentAttributeID>tree</vegetationComponentAttributeID>
573
						<height>
574
							<value>
575
								<xsl:value-of select="ds:PlotObsMeanTopHeight"/>
576
							</value>
577
						</height>
578
					</structure>
579
				</vegetationStructure>
580
			</xsl:if>
581
		</plotObservation>
582
	</xsl:template>
583
	<xsl:template name="GroundCovers">
584
		<!--Called from ds:PlotObs to give ground covers for a particular PlotObservation-->
585
		<xsl:param name="ThisPlotObsID"/>
586
		<xsl:text disable-output-escaping="yes">&#10;</xsl:text>
587
		<!--New line-->
588
		<xsl:for-each select="//ds:PlotGroundCover[ds:PlotObsID=$ThisPlotObsID]">
589
			<cover>
590
				<coverTypeAttributeID>MC<xsl:value-of select="ds:TypeMeasurementCategoryID"/></coverTypeAttributeID>
591
				<coverPercent>
592
					<value>
593
						<xsl:value-of select="ds:PlotGroundCoverPercent"/>
594
					</value>
595
					<attributeID>
596
						<xsl:call-template name="GetMeasurementUnitIDNonSample">
597
							<xsl:with-param name="ThisProjectID">
598
								<xsl:value-of select="ds:ProjectID"/>
599
							</xsl:with-param>
600
							<!--NVSClassLibrary.EMeasureType.GroundCover%=91-->
601
							<xsl:with-param name="ThisMeasureTypeID">92</xsl:with-param>
602
						</xsl:call-template>
603
					</attributeID>
604
				</coverPercent>
605
			</cover>
606
		<xsl:text disable-output-escaping="yes">&#10;    </xsl:text>
607
		<!--New line-->
608
		</xsl:for-each>
609

    
610
	</xsl:template>
611
	<xsl:template match="ds:Taxon">
612
		<taxonNameUsageConcept>
613
			<xsl:attribute name="id"><xsl:value-of select="ds:TaxonID"/></xsl:attribute>
614
			<authorName>
615
				<xsl:value-of select="ds:TaxonSpeciesName"/>
616
			</authorName>
617
			<authorCode>
618
				<xsl:value-of select="ds:TaxonSpeciesCode"/>
619
			</authorCode>
620
		</taxonNameUsageConcept>
621
	</xsl:template>
622
	<xsl:template match="ds:TierMeasurementCategory">
623
		<!--A summary of the categories used by tiers in the projects-->
624
		<stratum>
625
			<xsl:attribute name="id">MC<xsl:value-of select="ds:MeasurementCategoryID"/></xsl:attribute>
626
			<methodID>
627
				<!--May be either a Recce Tier or a Taxon Tier (seedling)-->
628
				<xsl:call-template name="GetMeasurementIDSample">
629
					<xsl:with-param name="ThisSampleMethodID">
630
						<xsl:value-of select="ds:SampleMethodID"/>
631
					</xsl:with-param>
632
					<!--NVSClassLibrary.EMeasureType.RecceTier=41-->
633
					<xsl:with-param name="ThisMeasureTypeID">41</xsl:with-param>
634
				</xsl:call-template>
635
				<xsl:call-template name="GetMeasurementIDSample">
636
					<xsl:with-param name="ThisSampleMethodID">
637
						<xsl:value-of select="ds:SampleMethodID"/>
638
					</xsl:with-param>
639
					<!--NVSClassLibrary.EMeasureType.RecceTier=47-->
640
					<xsl:with-param name="ThisMeasureTypeID">47</xsl:with-param>
641
				</xsl:call-template>
642
			</methodID>
643
			<stratumName>
644
				<xsl:value-of select="ds:CategoryDisplayText"/>
645
			</stratumName>
646
			<stratumIndex>
647
				<xsl:value-of select="ds:CategoryName"/>
648
			</stratumIndex>
649
		</stratum>
650
	</xsl:template>
651
	<xsl:template match="ds:Tier[ds:TierID]">
652
		<stratumObservation>
653
			<xsl:attribute name="id"><xsl:value-of select="ds:TierID"/></xsl:attribute>
654
			<stratumID>MC<xsl:value-of select="ds:MeasurementCategoryID"/></stratumID>
655
			<plotObservationID>
656
				<xsl:value-of select="ds:PlotObsID"/>
657
			</plotObservationID>
658
			<xsl:choose>
659
   				<xsl:when test="ds:TierUpper">
660
				<height>
661
					<value>
662
						<xsl:value-of select="ds:TierUpper"/>
663
					</value>
664
					<attributeID>
665
						<xsl:call-template name="GetMeasurementUnitIDSample">
666
							<xsl:with-param name="ThisSampleMethodID">
667
								<xsl:value-of select="ds:SampleMethodID"/>
668
							</xsl:with-param>
669
							<!--NVSClassLibrary.EMeasureType.TaxonTierHeight=115-->
670
							<xsl:with-param name="ThisMeasureTypeID">115</xsl:with-param>
671
						</xsl:call-template>
672
					</attributeID>
673
				</height>
674
				</xsl:when>
675
   				<xsl:otherwise>
676
				<height><value/><attributeID/></height>
677
				</xsl:otherwise>
678
 			</xsl:choose>
679
			<xsl:choose>
680
   				<xsl:when test="ds:TierLower">
681
				<base>
682
					<value>
683
						<xsl:value-of select="ds:TierLower"/>
684
					</value>
685
					<attributeID>
686
						<xsl:call-template name="GetMeasurementUnitIDSample">
687
							<xsl:with-param name="ThisSampleMethodID">
688
								<xsl:value-of select="ds:SampleMethodID"/>
689
							</xsl:with-param>
690
							<!--NVSClassLibrary.EMeasureType.TaxonTierHeight=115-->
691
							<xsl:with-param name="ThisMeasureTypeID">115</xsl:with-param>
692
						</xsl:call-template>
693
					</attributeID>
694
				</base>
695
				</xsl:when>
696
   				<xsl:otherwise>
697
				<base><value/><attributeID/></base>
698
				</xsl:otherwise>
699
 			</xsl:choose>
700
			<stratumValue>
701
				<attributeID><xsl:if test="ds:CoverClassMeasurementCategoryID">MC<xsl:value-of select="ds:CoverClassMeasurementCategoryID"/>
702
					</xsl:if></attributeID>
703
			</stratumValue>
704
		</stratumObservation>
705
	</xsl:template>
706
	<xsl:template match="ds:TaxonCategoryValue">
707
		<aggregateOrganismObservation>
708
			<xsl:attribute name="id"><xsl:value-of select="ds:TaxonObsID"/></xsl:attribute>
709
			<plotObservationID>
710
				<xsl:value-of select="ds:PlotObsID"/>
711
			</plotObservationID>
712
			<xsl:if test="ds:TierID">
713
				<stratumObservationID>
714
					<xsl:value-of select="ds:TierID"/>
715
				</stratumObservationID>
716
			</xsl:if>
717
			<taxonNameUsageConceptID>
718
				<xsl:value-of select="ds:TaxonID"/>
719
			</taxonNameUsageConceptID>
720
			<aggregateValue>
721
				<attributeID>MC<xsl:value-of select="ds:MeasurementCategoryID"/></attributeID>
722
			</aggregateValue>
723
			<xsl:if test="ds:TaxonObsNote!=''">
724
				<note>
725
					<text>
726
						<xsl:value-of select="ds:TaxonObsNote"/>
727
					</text>
728
					<date/>
729
					<type>TaxonObsNote</type>
730
				</note>
731
			</xsl:if>
732
			<xsl:call-template name="Notes">
733
				<xsl:with-param name="NoteObjectTypeName">TaxonObservation</xsl:with-param>
734
				<xsl:with-param name="NoteObjectID">
735
					<xsl:value-of select="ds:TaxonObsID"/>
736
				</xsl:with-param>
737
			</xsl:call-template>
738
		</aggregateOrganismObservation>
739
	</xsl:template>
740
	<xsl:template match="ds:TaxonSimpleValue">
741
		<aggregateOrganismObservation>
742
			<xsl:attribute name="id"><xsl:value-of select="ds:TaxonObsID"/></xsl:attribute>
743
			<plotObservationID>
744
				<xsl:value-of select="ds:PlotObsID"/>
745
			</plotObservationID>
746
			<stratumObservationID>
747
				<xsl:value-of select="ds:TierID"/>
748
			</stratumObservationID>
749
			<taxonNameUsageConceptID>
750
				<xsl:value-of select="ds:TaxonID"/>
751
			</taxonNameUsageConceptID>
752
			<aggregateValue><aggregateValue>
753
					<value>
754
						<xsl:value-of select="ds:TaxonSimpleValueValue"/>
755
					</value>
756
					<attributeID>
757
					<xsl:call-template name="GetMeasurementUnitIDSample">
758
							<xsl:with-param name="ThisSampleMethodID">
759
							<xsl:value-of select="ds:SampleMethodID"/>
760
							</xsl:with-param>
761
							<!--NVSClassLibrary.EMeasureType.TaxonSimpleValue=45-->
762
							<xsl:with-param name="ThisMeasureTypeID">45</xsl:with-param>
763
						</xsl:call-template>
764
					</attributeID>
765
			</aggregateValue></aggregateValue>
766
			<xsl:if test="ds:TaxonObsNote!=''">
767
				<note>
768
					<text>
769
						<xsl:value-of select="ds:TaxonObsNote"/>
770
					</text>
771
					<date/>
772
					<type>TaxonObsNote</type>
773
				</note>
774
			</xsl:if>
775
			<xsl:call-template name="Notes">
776
				<xsl:with-param name="NoteObjectTypeName">TaxonObservation</xsl:with-param>
777
				<xsl:with-param name="NoteObjectID">
778
					<xsl:value-of select="ds:TaxonObsID"/>
779
				</xsl:with-param>
780
			</xsl:call-template>
781
		</aggregateOrganismObservation>
782
	</xsl:template>
783
	<xsl:template match="ds:TaxonBrowse">
784
		<aggregateOrganismObservation>
785
			<xsl:attribute name="id"><xsl:value-of select="ds:TaxonObsID"/></xsl:attribute>
786
			<plotObservationID>
787
				<xsl:value-of select="ds:PlotObsID"/>
788
			</plotObservationID>
789
			<xsl:if test="ds:TierID">
790
				<stratumObservationID>
791
					<xsl:value-of select="ds:TierID"/>
792
				</stratumObservationID>
793
			</xsl:if>
794
			<taxonNameUsageConceptID>
795
				<xsl:value-of select="ds:TaxonID"/>
796
			</taxonNameUsageConceptID>
797
			<aggregateValue>
798
				<attributeID>MC<xsl:value-of select="ds:SeverityMeasurementCategoryID"/></attributeID>
799
			</aggregateValue>
800
			<xsl:if test="ds:TaxonObsNote!=''">
801
				<note>
802
					<text>
803
						<xsl:value-of select="ds:TaxonObsNote"/>
804
					</text>
805
					<type>TaxonObsNote</type>
806
				</note>
807
			</xsl:if>
808
			<xsl:call-template name="Notes">
809
				<xsl:with-param name="NoteObjectTypeName">TaxonObservation</xsl:with-param>
810
				<xsl:with-param name="NoteObjectID">
811
					<xsl:value-of select="ds:TaxonObsID"/>
812
				</xsl:with-param>
813
			</xsl:call-template>
814
		</aggregateOrganismObservation>
815
	</xsl:template>
816
	<xsl:template match="ds:TaxonPercentageCover">
817
		<aggregateOrganismObservation>
818
			<xsl:attribute name="id"><xsl:value-of select="ds:TaxonObsID"/></xsl:attribute>
819
			<plotObservationID>
820
				<xsl:value-of select="ds:PlotObsID"/>
821
			</plotObservationID>
822
			<taxonNameUsageConceptID>
823
				<xsl:value-of select="ds:TaxonID"/>
824
			</taxonNameUsageConceptID>
825
			<aggregateValue><aggregateValue>
826
					<value>
827
						<xsl:value-of select="ds:PercentageCover"/>
828
					</value>
829
					<attributeID>
830
						<xsl:call-template name="GetMeasurementUnitIDSample">
831
							<xsl:with-param name="ThisSampleMethodID">
832
								<xsl:value-of select="ds:SampleMethodID"/>
833
							</xsl:with-param>
834
							<!--NVSClassLibrary.EMeasureType.TaxonPercentageCover=42-->
835
							<xsl:with-param name="ThisMeasureTypeID">42</xsl:with-param>
836
						</xsl:call-template>
837
					</attributeID>
838
			</aggregateValue></aggregateValue>
839
			<xsl:if test="ds:TaxonObsNote!=''">
840
				<note>
841
					<text>
842
						<xsl:value-of select="ds:TaxonObsNote"/>
843
					</text>
844
					<type>TaxonObsNote</type>
845
				</note>
846
			</xsl:if>
847
			<xsl:call-template name="Notes">
848
				<xsl:with-param name="NoteObjectTypeName">TaxonObservation</xsl:with-param>
849
				<xsl:with-param name="NoteObjectID">
850
					<xsl:value-of select="ds:TaxonObsID"/>
851
				</xsl:with-param>
852
			</xsl:call-template>
853
		</aggregateOrganismObservation>
854
	</xsl:template>
855
	<xsl:template match="ds:Item">
856
		<!--A NVS Item (a tree) correspondes to a VegX individual item-->
857
		<individualOrganism>
858
			<xsl:attribute name="id"><xsl:value-of select="ds:ItemID"/></xsl:attribute>
859
			<!--VegX schema has taxonNameUsageConceptsID instead of taxonNameUsageConceptID-->
860
			<taxonNameUsageConceptID>
861
				<xsl:value-of select="ds:TaxonID"/>
862
			</taxonNameUsageConceptID>
863
			<xsl:if test="ds:ItemCurrentIdentifier!=''">
864
				<identificationLabel>
865
					<xsl:value-of select="ds:ItemCurrentIdentifier"/>
866
				</identificationLabel>
867
			</xsl:if>
868
			<xsl:call-template name="Notes">
869
				<xsl:with-param name="NoteObjectTypeName">Item</xsl:with-param>
870
				<xsl:with-param name="NoteObjectID">
871
					<xsl:value-of select="ds:ItemID"/>
872
				</xsl:with-param>
873
			</xsl:call-template>
874
		</individualOrganism>
875
	</xsl:template>
876
	<xsl:template match="ds:Diameter">
877
		<individualOrganismObservation>
878
			<xsl:attribute name="id"><xsl:value-of select="ds:DiameterID"/></xsl:attribute>
879
			<plotObservationID>
880
				<xsl:value-of select="ds:PlotObsID"/>
881
			</plotObservationID>
882
			<individualOrganismID>
883
				<xsl:value-of select="ds:ItemID"/>
884
			</individualOrganismID>
885
			<xsl:if test="ds:ItemObsNote!=''">
886
				<note>
887
					<text>
888
						<xsl:value-of select="ds:ItemObsNote"/>
889
					</text>
890
					<date/>
891
					<type>ItemObsNote</type>
892
				</note>
893
			</xsl:if>
894
			<xsl:if test="ds:LinearDimension">
895
				<height>
896
					<value>
897
						<xsl:value-of select="ds:LinearDimension"/>
898
					</value>
899
					<attributeID>
900
						<xsl:call-template name="GetMeasurementUnitIDSample">
901
							<xsl:with-param name="ThisSampleMethodID">
902
								<xsl:value-of select="ds:SampleMethodID"/>
903
							</xsl:with-param>
904
							<!--NVSClassLibrary.EMeasureType.LinearDimension=52-->
905
							<xsl:with-param name="ThisMeasureTypeID">52</xsl:with-param>
906
						</xsl:call-template>
907
					</attributeID>
908
				</height>
909
			</xsl:if>
910
			<xsl:if test="ds:DiameterValue">
911
				<diameterBaseDistance>
912
					<diameter>
913
						<!--Convert cm to metres-->
914
						<value>
915
							<xsl:value-of select="ds:DiameterValue"/>
916
						</value>
917
						<attributeID>
918
							<xsl:call-template name="GetMeasurementUnitIDSample">
919
								<xsl:with-param name="ThisSampleMethodID">
920
									<xsl:value-of select="ds:SampleMethodID"/>
921
								</xsl:with-param>
922
								<!--NVSClassLibrary.EMeasureType.DiameterValue=54-->
923
								<xsl:with-param name="ThisMeasureTypeID">54</xsl:with-param>
924
							</xsl:call-template>
925
						</attributeID>
926
					</diameter>
927
					<baseDistance>
928
					<xsl:if test="ds:DiameterHeight">
929
							<value>
930
								<xsl:value-of select="ds:DiameterHeight"/>
931
							</value>
932
							<attributeID>
933
								<xsl:call-template name="GetMeasurementUnitIDSample">
934
									<xsl:with-param name="ThisSampleMethodID">
935
										<xsl:value-of select="ds:SampleMethodID"/>
936
									</xsl:with-param>
937
									<!--NVSClassLibrary.EMeasureType.DiameterHeight=62-->
938
									<xsl:with-param name="ThisMeasureTypeID">62</xsl:with-param>
939
								</xsl:call-template>
940
							</attributeID>
941
					</xsl:if>
942
					<xsl:if test="ds:PositionMeasurementCategoryID">
943
							MC<attributeID>PositionMeasurementCategoryID</attributeID>
944
					</xsl:if>
945
					</baseDistance>
946
				</diameterBaseDistance>
947
			</xsl:if>
948
			<xsl:if test="ds:AliveStateMeasurementCategoryID">
949
				<individualOrganismHealth>
950
				<xsl:call-template name="GetMeasurementCategoryText">
951
				<xsl:with-param name="ThisMeasurementCategoryID">
952
					<xsl:value-of select="ds:AliveStateMeasurementCategoryID"/>
953
				</xsl:with-param>
954
				</xsl:call-template>
955
				</individualOrganismHealth>
956
			</xsl:if>
957
			
958
			<xsl:call-template name="Notes">
959
				<xsl:with-param name="NoteObjectTypeName">ItemObservation</xsl:with-param>
960
				<xsl:with-param name="NoteObjectID">
961
					<xsl:value-of select="ds:ItemObsID"/>
962
				</xsl:with-param>
963
			</xsl:call-template>
964
		</individualOrganismObservation>
965
	</xsl:template>
966
	<xsl:template match="ds:OrthogonalWidth">
967
		<individualOrganismObservation>
968
			<xsl:attribute name="id">OWidth<xsl:value-of select="ds:OrthogonalWidthID"/></xsl:attribute>
969
			<plotObservationID>
970
				<xsl:value-of select="ds:PlotObsID"/>
971
			</plotObservationID>
972
			<individualOrganismID>
973
				<xsl:value-of select="ds:ItemID"/>
974
			</individualOrganismID>
975
			<xsl:if test="ds:ItemObsNote!=''">
976
				<note>
977
					<text>
978
						<xsl:value-of select="ds:ItemObsNote"/>
979
					</text>
980
					<date/>
981
					<type>ItemObsNote</type>
982
				</note>
983
			</xsl:if>
984
			<xsl:if test="ds:LinearDimension">
985
				<height>
986
					<xsl:value-of select="ds:LinearDimension"/>
987
				</height>
988
			</xsl:if>
989
			<!--relatedIndividual>
990
				<relatedItem>
991
				<relatedItemID>
992
				</relatedItemID>
993
				</relatedItem>
994
				<itemRelationship/>
995
			</relatedIndividualTODO bracketing-->
996
			<multipleMeasurement>
997
				<name>Width</name>
998
				<measurement>
999
					<value>
1000
						<xsl:value-of select="ds:OrthogonalWidthOne"/>
1001
					</value>
1002
					<attributeID>
1003
						<xsl:call-template name="GetMeasurementUnitIDSample">
1004
							<xsl:with-param name="ThisSampleMethodID">
1005
								<xsl:value-of select="ds:SampleMethodID"/>
1006
							</xsl:with-param>
1007
							<!--NVSClassLibrary.EMeasureType.OrthogonalWidthValue=56-->
1008
							<xsl:with-param name="ThisMeasureTypeID">56</xsl:with-param>
1009
						</xsl:call-template>
1010
					</attributeID>
1011
				</measurement>
1012
				<measurement>
1013
					<value>
1014
						<xsl:value-of select="ds:OrthogonalWidthTwo"/>
1015
					</value>
1016
					<attributeID>
1017
						<xsl:call-template name="GetMeasurementUnitIDSample">
1018
							<xsl:with-param name="ThisSampleMethodID">
1019
								<xsl:value-of select="ds:SampleMethodID"/>
1020
							</xsl:with-param>
1021
							<!--NVSClassLibrary.EMeasureType.OrthogonalWidthValue=56-->
1022
							<xsl:with-param name="ThisMeasureTypeID">56</xsl:with-param>
1023
						</xsl:call-template>
1024
					</attributeID>
1025
				</measurement>
1026
			</multipleMeasurement>
1027
	
1028
			<xsl:call-template name="Notes">
1029
				<xsl:with-param name="NoteObjectTypeName">ItemObservation</xsl:with-param>
1030
				<xsl:with-param name="NoteObjectID">
1031
					<xsl:value-of select="ds:ItemObsID"/>
1032
				</xsl:with-param>
1033
			</xsl:call-template>
1034
			<xsl:if test="ds:AliveStateMeasurementCategoryID">
1035
				<individualOrganismHealth>
1036
				<xsl:call-template name="GetMeasurementCategoryText">
1037
				<xsl:with-param name="ThisMeasurementCategoryID">
1038
					<xsl:value-of select="ds:AliveStateMeasurementCategoryID"/>
1039
				</xsl:with-param>
1040
				</xsl:call-template>
1041
				</individualOrganismHealth>
1042
			</xsl:if>
1043
		</individualOrganismObservation>
1044
	</xsl:template>
1045
</xsl:stylesheet>
(1-1/2)