Skip to content

Commit

Permalink
[#26] Update XSLT and Jupyter NB. Extend example.
Browse files Browse the repository at this point in the history
  • Loading branch information
mernst committed Jul 31, 2024
1 parent e78754d commit cbc1a96
Show file tree
Hide file tree
Showing 3 changed files with 312 additions and 404 deletions.
20 changes: 20 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="unit_references" select="/abcd:DataSets/abcd:DataSet/abcd:Units/abcd:Unit/abcd:UnitReferences"></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 @@ -231,6 +232,25 @@ exclude-result-prefixes="xsl md panxslt set">
<xsl:for-each select="$lithostratigraphic[not(.=preceding::*)]">
<keyword><xsl:value-of select="."/></keyword>
</xsl:for-each>

<!-- @reverse -->
<xsl:element name="reverse">
<xsl:for-each select="$unit_references">
<xsl:for-each select="./abcd:UnitReference[not(.=preceding::*)]">
<citation type="CreativeWork">
<xsl:if test="./abcd:TitleCitation">
<name><xsl:value-of select="./abcd:TitleCitation"/></name>
</xsl:if>
<xsl:if test="./abcd:CitationDetail">
<description><xsl:value-of select="./abcd:CitationDetail"/></description>
</xsl:if>
<xsl:if test="./abcd:URI">
<identifier><xsl:value-of select="./abcd:URI"/></identifier>
</xsl:if>
</citation>
</xsl:for-each>
</xsl:for-each>
</xsl:element>

<xsl:for-each select="$taxon_name[not(.=preceding::*)]">
<about type="Taxon">
Expand Down
Loading

0 comments on commit cbc1a96

Please sign in to comment.