Skip to content

Commit

Permalink
[#4] Added URI mapping & extended example file
Browse files Browse the repository at this point in the history
  • Loading branch information
mernst committed Jul 10, 2024
1 parent c3cb8ed commit a85c38b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions transformations/abcd2bioschemas/abcd2bioschemas-xml.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ exclude-result-prefixes="xsl md panxslt set">

<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:variable name="dataset_id" select="/abcd:DataSets/abcd:DataSet/abcd:DatasetGUID"></xsl:variable>
<xsl:variable name="dataset_icon" select="/abcd:DataSets/abcd:DataSet/abcd:Metadata/abcd:IconURI"></xsl:variable>
<xsl:variable name="dataset_access" select="/abcd:DataSets/abcd:DataSet/abcd:Metadata/abcd:DirectAccessURI"></xsl:variable>
<xsl:variable name="dataset_title" select="/abcd:DataSets/abcd:DataSet/abcd:Metadata/abcd:Description/abcd:Representation/abcd:Title"></xsl:variable>
<xsl:variable name="dataset_details" select="/abcd:DataSets/abcd:DataSet/abcd:Metadata/abcd:Description/abcd:Representation/abcd:Details"></xsl:variable>
<xsl:variable name="dataset_url" select="/abcd:DataSets/abcd:DataSet/abcd:Metadata/abcd:Description/abcd:Representation/abcd:URI"></xsl:variable>
Expand Down Expand Up @@ -63,6 +65,22 @@ exclude-result-prefixes="xsl md panxslt set">
</xsl:choose>
<!-- </xsl:variable>-->
</description>
<xsl:if test="$dataset_icon">
<image><xsl:value-of select="$dataset_icon" /></image>
</xsl:if>
<xsl:if test="$dataset_access">
<distribution type="DataDownload">
<xsl:choose>
<xsl:when test="contains($dataset_access,'.zip')">
<contentUrl><xsl:value-of select="$dataset_access" /></contentUrl>
<encodingFormat>application/zip</encodingFormat>
</xsl:when>
<xsl:otherwise>
<url><xsl:value-of select="$dataset_access" /></url>
</xsl:otherwise>
</xsl:choose>
</distribution>
</xsl:if>
<inLanguage>en</inLanguage>
<xsl:for-each select="$recordbasis[not(.=preceding::*)]">
<additionalType><xsl:value-of select="."/></additionalType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
<URI>https://data.bgbm.org/dataset/gfbio/0004/</URI>
</Representation>
</Description>
<IconURI>http://ww3.bgbm.org/providerResources/BGBM.jpg</IconURI>
<DirectAccessURI>https://data-rebind.bgbm.org/rest//db/gfbio/public/GFBioHoffmannPlants/archive/HoffmannPlantsV2.xml.zip</DirectAccessURI>
<RevisionData>
<Creators>Dr. Anke Hoffmann</Creators>
<Contributors>Tom Friday Baluku, Maren Gleisberg</Contributors>
Expand Down

0 comments on commit a85c38b

Please sign in to comment.