-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add v89 of standard name table and v12 of area type table.
- Loading branch information
Showing
26 changed files
with
191,220 additions
and
1,083 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
The XML file in the src directory is used to build the HTML version of the CF Area Type Table in the build directory. | ||
|
||
See the makefile for the avilable document build options. |
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/env python | ||
|
||
import sys, re | ||
|
||
HELP = """%s - Retrieves title string. \nUsage: %s <file>"""%(sys.argv[0], sys.argv[0]) | ||
|
||
if len(sys.argv) < 2: | ||
print(HELP) | ||
sys.exit(1) | ||
|
||
file = sys.argv[1] | ||
|
||
# Read input. | ||
with open(file, 'r', encoding="utf8") as i: | ||
s = i.read() | ||
|
||
# Read input. | ||
#i = open(file, 'r') | ||
#s = i.read() | ||
#i.close() | ||
|
||
# Fetch title. | ||
p = re.compile('<title>(.*?)</title>', re.DOTALL) | ||
m = re.search(p, s) | ||
title = m.group(1) | ||
|
||
# Fetch version. | ||
version = None | ||
try: | ||
p = re.compile('<subtitle>Version (.*?),(.*?)</subtitle>', re.DOTALL) | ||
m = re.search(p, s) | ||
version = m.group(1) | ||
except: | ||
try: | ||
p = re.compile('<version_number>(.*?)</version_number>', re.DOTALL) | ||
m = re.search(p, s) | ||
version = m.group(1) | ||
except: | ||
pass | ||
|
||
# Print output. | ||
print('--------------------------------------------') | ||
print(' Title: %s'%title) | ||
if version != None: | ||
print(' Version: %s'%version) | ||
print('--------------------------------------------') | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
clean: | ||
rm build/area-type-table.html | ||
|
||
area-type-table: | ||
xsltproc xsl/html/area-type-table-1.1.xsl src/area-type-table.xml > build/area-type-table.html | ||
./get-title-version.py src/area-type-table.xml |
Large diffs are not rendered by default.
Oops, something went wrong.
129 changes: 129 additions & 0 deletions
129
Data/area-type-table/12/xsl/html/area-type-table-1.1.xsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
<?xml version='1.0'?> | ||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | ||
|
||
<xsl:template match="/"> | ||
<html> | ||
<xsl:apply-templates/> | ||
</html> | ||
</xsl:template> | ||
|
||
<xsl:template match="area_type_table"> | ||
<head> | ||
<!-- Put something useful into the Title --> | ||
<title>CF area types</title> | ||
|
||
<h1 class="documentFirstHeading">CF Area Type Table</h1> | ||
|
||
<!-- This page requires an external javascript which is included by Plone --> | ||
<!-- See: /usr/local/zopeinstance1/Products/CMFPlone/skins/plone_ecmascript/toggleHelp.js --> | ||
<script> | ||
|
||
function toggleHelp(standard_name) | ||
{ | ||
// check for the existence of the help tr object for this standard_name | ||
var helpDiv = document.getElementById(standard_name + '_help'); | ||
|
||
if (helpDiv) | ||
{ | ||
if (helpDiv.style.display != 'none') | ||
{ | ||
helpDiv.style.display = 'none'; | ||
|
||
curArrow = document.getElementById(standard_name + '_arrow'); | ||
curArrow.src = '../build/media/images/arrow_right.gif'; | ||
} | ||
else | ||
{ | ||
helpDiv.style.display = ''; | ||
|
||
curArrow = document.getElementById(standard_name + '_arrow'); | ||
curArrow.src = '../build/media/images/arrow_down.gif'; | ||
} | ||
} | ||
} | ||
|
||
|
||
function showHelp(standard_name) | ||
{ | ||
var helpDiv = document.getElementById(standard_name + '_help'); | ||
|
||
if (helpDiv) | ||
{ | ||
helpDiv.style.display = ''; | ||
curArrow = document.getElementById(standard_name + '_arrow'); | ||
curArrow.src = '../build/media/images/arrow_down.gif'; | ||
} | ||
} | ||
|
||
function hideHelp(standard_name) | ||
{ | ||
var helpDiv = document.getElementById(standard_name + '_help'); | ||
|
||
if (helpDiv) | ||
{ | ||
helpDiv.style.display = 'none'; | ||
curArrow = document.getElementById(standard_name + '_arrow'); | ||
curArrow.src = '../build/media/images/arrow_right.gif'; | ||
} | ||
} | ||
|
||
</script> | ||
|
||
</head> | ||
<body> | ||
<b>Version <xsl:value-of select="version_number"/>, <xsl:value-of select="date"/></b> | ||
<br/> | ||
<table id="area_type_table" border="1" width="100%" cellpadding="2" cellspacing="0"> | ||
<th width="100%">Area Type</th> | ||
<xsl:apply-templates select="entry"/> | ||
</table> | ||
</body> | ||
</xsl:template> | ||
|
||
<xsl:template match="entry"> | ||
<tr> | ||
<xsl:attribute name="id"><xsl:value-of select="@id"/>_tr</xsl:attribute> | ||
|
||
<td> | ||
<a> | ||
<xsl:attribute name="name"> | ||
<xsl:value-of select="@id"/> | ||
</xsl:attribute> | ||
</a> | ||
<img> | ||
<xsl:attribute name="id"><xsl:value-of select="@id"/>_arrow</xsl:attribute> | ||
<xsl:attribute name="src">../build/media/images/arrow_right.gif</xsl:attribute> | ||
</img> | ||
<code class="varname"> | ||
<a> | ||
<xsl:attribute name="href">javascript:void(0)</xsl:attribute> | ||
<xsl:attribute name="onclick">toggleHelp('<xsl:value-of select="@id"/>')</xsl:attribute> | ||
<xsl:value-of select="@id"/> | ||
</a> | ||
</code> | ||
<xsl:variable name="area_type_id" select="@id"/> | ||
<xsl:apply-templates select="../alias[entry_id=$area_type_id]"/> | ||
|
||
<div> | ||
<xsl:attribute name="id"><xsl:value-of select="@id"/>_help</xsl:attribute> | ||
<xsl:attribute name="style">display: none; padding-left: 16px; margin-top: 4px; border-top: 1px dashed #cccccc;</xsl:attribute> | ||
|
||
<xsl:choose> | ||
<xsl:when test="description=''"> | ||
No help available. | ||
</xsl:when> | ||
<xsl:otherwise> | ||
<xsl:value-of select="description"/> | ||
</xsl:otherwise> | ||
</xsl:choose> | ||
</div> | ||
|
||
</td> | ||
</tr> | ||
</xsl:template> | ||
|
||
<xsl:template match="alias"> | ||
<div style="padding-left: 16px;"><i>alias:</i> <xsl:value-of select="@id"/></div> | ||
</xsl:template> | ||
|
||
</xsl:stylesheet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<?xml version="1.0"?> | ||
<area_type_table xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="area-type-table-1.1.xsd"> | ||
<title>Area Type Table</title> | ||
<version_number>11</version_number> | ||
<date>06 July 2023</date> | ||
<version_number>12</version_number> | ||
<date>21 January 2025</date> | ||
<institution>Centre for Environmental Data Analysis</institution> | ||
<contact>[email protected]</contact> | ||
|
||
|
@@ -15,6 +15,12 @@ | |
<entry id="bare_ground"> | ||
<description></description> | ||
</entry> | ||
<entry id="broadleaf_deciduous_trees"> | ||
<description>Broadleaf trees are characterized by leaves that are broad, flat and thin with networked veins (reference: https://treeterms.co.uk/broadleaf/). Deciduous trees lose their leaves seasonally, for example, during winter in high latitudes or following seasonal variations in rainfall.</description> | ||
</entry> | ||
<entry id="broadleaf_evergreen_trees"> | ||
<description>Broadleaf trees are characterized by leaves that are broad, flat and thin with networked veins (reference: https://treeterms.co.uk/broadleaf/). Evergreen plants retain their leaves through the year and into the following growing season (reference: https://www.britannica.com/plant/evergreen-plant).</description> | ||
</entry> | ||
<entry id="burnt_vegetation"> | ||
<description></description> | ||
</entry> | ||
|
@@ -99,6 +105,12 @@ | |
<entry id="natural_grasses_of_c4_plant_functional_types"> | ||
<description>"Natural grasses" means grasses growing in areas of low productivity, often situated on rough or uneven ground. This can include rocky areas, briars and heathland. A "c4 plant" is one that utilizes the C4 carbon fixation pathway in which the CO2 is first bound to a compound containing four carbon atoms before photosynthesis reactions take place. All trees are C3 type. Grasses and crops can be C3 or C4.</description> | ||
</entry> | ||
<entry id="needleleaf_deciduous_trees"> | ||
<description>Needleleaf trees, often referred to as conifers, have long, thin needle-shaped leaves that are well adapted to retaining water. Deciduous trees lose their leaves seasonally, for example, during winter in high latitudes or following seasonal variations in rainfall.</description> | ||
</entry> | ||
<entry id="needleleaf_evergreen_trees"> | ||
<description>Needleleaf trees, often referred to as conifers, have long, thin needle-shaped leaves that are well adapted to retaining water. Evergreen plants retain their leaves through the year and into the following growing season (reference: https://www.britannica.com/plant/evergreen-plant).</description> | ||
</entry> | ||
<entry id="pastures"> | ||
<description>Pastures are assumed to be anthropogenic in origin. They include anthropogenically managed pastureland and rangeland.</description> | ||
</entry> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
The XML file in the src directory is used to build the HTML version of the CF Standard Name Table in the build directory. | ||
|
||
See the makefile for the available document build options. |
Oops, something went wrong.