Skip to content

Commit

Permalink
[#16] Added kind of unit mapping. Updated example.
Browse files Browse the repository at this point in the history
  • Loading branch information
mernst committed Jul 23, 2024
1 parent e78754d commit 5ba9b07
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions transformations/abcd2bioschemas/abcd2bioschemas-xml.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ exclude-result-prefixes="xsl md panxslt set">
<xsl:variable name="scope_geoecological" select="/abcd:DataSets/abcd:DataSet/abcd:Metadata/abcd:Scope/abcd:GeoecologicalTerms/*[self::abcd:GeoecologicalTerm or self::abcd:GeoEcologicalTerm]"></xsl:variable>

<xsl:variable name="recordbasis" select="/abcd:DataSets/abcd:DataSet/abcd:Units/abcd:Unit/abcd:RecordBasis"></xsl:variable>
<xsl:variable name="kind_of_unit" select="/abcd:DataSets/abcd:DataSet/abcd:Units/abcd:Unit/abcd:KindOfUnit"></xsl:variable>
<xsl:variable name="coordinates" select="/abcd:DataSets/abcd:DataSet/abcd:Units/abcd:Unit/abcd:Gathering/abcd:SiteCoordinateSets/abcd:SiteCoordinates/abcd:CoordinatesLatLong"></xsl:variable>
<xsl:variable name="country" select="/abcd:DataSets/abcd:DataSet/abcd:Units/abcd:Unit/abcd:Gathering/abcd:Country/abcd:Name"></xsl:variable>
<xsl:variable name="gathering_date" select="/abcd:DataSets/abcd:DataSet/abcd:Units/abcd:Unit/abcd:Gathering/abcd:DateTime"></xsl:variable>
Expand Down Expand Up @@ -67,6 +68,9 @@ exclude-result-prefixes="xsl md panxslt set">
<xsl:for-each select="$recordbasis[not(.=preceding::*)]">
<additionalType><xsl:value-of select="."/></additionalType>
</xsl:for-each>
<xsl:for-each select="$kind_of_unit[not(.=preceding::*)]">
<additionalType><xsl:value-of select="."/></additionalType>
</xsl:for-each>
<xsl:if test="$dataset_created">
<dateCreated><xsl:value-of select="substring-before($dataset_created,'T')"/></dateCreated>
</xsl:if>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@
</Identification>
</Identifications>
<RecordBasis>HumanObservation</RecordBasis>
<KindOfUnit>herbarium sheet</KindOfUnit>
<Gathering>
<DateTime>
<ISODateTimeEnd>1995-06-13</ISODateTimeEnd>
Expand Down Expand Up @@ -604,6 +605,7 @@
</Identification>
</Identifications>
<RecordBasis>HumanObservation</RecordBasis>
<KindOfUnit>leaves</KindOfUnit>
<Gathering>
<DateTime>
<ISODateTimeEnd>1995-06-13</ISODateTimeEnd>
Expand Down

0 comments on commit 5ba9b07

Please sign in to comment.