comparison emldown_templates/temporal_coverage.xsl @ 0:cfe884e53600 draft default tip

planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/main/tools-ecology/tools/make_data_paper_sketches commit 34f4e0604adc2a2ba4902ce6b8e6df2460eda292
author ecology
date Tue, 15 Oct 2024 20:33:48 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:cfe884e53600
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4
5 <xsl:template name="temporal_coverage" match="/">
6 <xsl:choose>
7 <xsl:when test=".//temporalCoverage">
8 <h3>Temporal coverage</h3>
9
10 <!-- If there is a rangeOfDates node, create a table of the values -->
11 <xsl:if test="//dataset/coverage/temporalCoverage/rangeOfDates">
12 <table class="table table-striped">
13 <tr>
14 <th>Start date</th>
15 <th>End date</th>
16 </tr>
17 <xsl:for-each select="//dataset/coverage/temporalCoverage/rangeOfDates">
18 <tr>
19 <td><xsl:value-of select="beginDate/calendarDate"/></td>
20 <td><xsl:value-of select="endDate/calendarDate"/></td>
21 </tr>
22 </xsl:for-each>
23 </table>
24 </xsl:if>
25
26 <!-- If there is a singleDateTime node, create a table of the values -->
27 <xsl:if test="//dataset/coverage/temporalCoverage/singleDateTime">
28 <table class="table table-striped">
29 <tr>
30 <th>Date</th>
31 </tr>
32 <xsl:for-each select="//dataset/coverage/temporalCoverage/singleDateTime">
33 <tr>
34 <td><xsl:value-of select="calendarDate"/></td>
35 </tr>
36 </xsl:for-each>
37 </table>
38 </xsl:if>
39 </xsl:when>
40 </xsl:choose>
41 </xsl:template>
42 </xsl:stylesheet>
43