Skip to content

Commit

Permalink
Update software xslt transformation
Browse files Browse the repository at this point in the history
  • Loading branch information
physikerwelt committed Mar 11, 2024
1 parent a65f2ef commit 4e0e607
Show file tree
Hide file tree
Showing 2 changed files with 136 additions and 136 deletions.
240 changes: 120 additions & 120 deletions test/data/software/reference.xml
Original file line number Diff line number Diff line change
@@ -1,121 +1,121 @@
<?xml version="1.0" encoding="utf-8"?>
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://datacite.org/schema/kernel-4" xsi:schemaLocation="http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4.1/metadata.xsd">
<identifier identifierType="swMATH">2</identifier>
<creators>Li, X.S., Demmel, J.W.</creators>
<titles>
<title>SuperLU-DIST</title>
</titles>
<publicationYear>2003</publicationYear>
<subjects>
<subject>35</subject>
<subject>65</subject>
<subject>68</subject>
<subject>74</subject>
<subject>76</subject>
<subject>05</subject>
<subject>15</subject>
<subject>60</subject>
<subject>78</subject>
<subject>80</subject>
<subject>81</subject>
<subject>82</subject>
<subject>85</subject>
<subject>86</subject>
<subject>90</subject>
<subject>92</subject>
<subject>orms</subject>
</subjects>

<resourceType resourceTypeGeneral="Software"/>
<alternateIdentifiers>
<alternateIdentifier alternateIdentifierType="url">https://zbmath.org/software/?q=si%3A2</alternateIdentifier>
</alternateIdentifiers>

<related_software>
<id>4013</id>
<name>MUMPS</name>
</related_software>
<related_software>
<id>4012</id>
<name>PETSc</name>
</related_software>
<related_software>
<id>930</id>
<name>SuperLU</name>
</related_software>
<related_software>
<id>4629</id>
<name>SparseMatrix</name>
</related_software>
<related_software>
<id>503</id>
<name>LAPACK</name>
</related_software>
<related_software>
<id>679</id>
<name>PARDISO</name>
</related_software>
<related_software>
<id>426</id>
<name>hypre</name>
</related_software>
<related_software>
<id>989</id>
<name>UMFPACK</name>
</related_software>
<related_software>
<id>4089</id>
<name>METIS</name>
</related_software>
<related_software>
<id>4028</id>
<name>Trilinos</name>
</related_software>
<related_software>
<id>830</id>
<name>ScaLAPACK</name>
</related_software>
<related_software>
<id>4827</id>
<name>mctoolbox</name>
</related_software>
<related_software>
<id>6749</id>
<name>WSMP</name>
</related_software>
<related_software>
<id>3216</id>
<name>BLAS</name>
</related_software>
<related_software>
<id>418</id>
<name>HSL</name>
</related_software>
<related_software>
<id>8067</id>
<name>ML</name>
</related_software>
<related_software>
<id>2780</id>
<name>SPIKE</name>
</related_software>
<related_software>
<id>6496</id>
<name>MPI</name>
</related_software>
<related_software>
<id>9043</id>
<name>MFEM</name>
</related_software>
<related_software>
<id>17483</id>
<name>STRUMPACK</name>
</related_software>
<description>zbMATH Open Web Interface contents unavailable due to conflicting licenses.</description>
<contributor contributorType="HostingInstitution">http://crd-legacy.lbl.gov/~xiaoye/SuperLU/</contributor>
<relatedIdentifier relationType="IsReferencedBy">2187846</relatedIdentifier>
<relatedIdentifier relationType="IsDescribedBy">https://orms.mfo.de/project@id=265.html</relatedIdentifier>
<rightsList>
<rights>No license</rights>
</rightsList>
<?xml version="1.0" encoding="UTF-8"?>
<resource
xsi:schemaLocation="http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4.1/metadata.xsd"
xmlns="http://datacite.org/schema/kernel-4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<identifier identifierType="swMATH">2</identifier>
<creators>Li, X.S., Demmel, J.W.</creators>
<resourceType resourceTypeGeneral="Software"/>
<titles>
<title>SuperLU-DIST</title>
</titles>
<description>zbMATH Open Web Interface contents unavailable due to conflicting licenses.</description>
<publicationYear>2003</publicationYear>
<contributor contributorType="HostingInstitution">http://crd-legacy.lbl.gov/~xiaoye/SuperLU/</contributor>
<rightsList>
<rights>No license</rights>
</rightsList>
<subjects>
<subject>35</subject>
<subject>65</subject>
<subject>68</subject>
<subject>74</subject>
<subject>76</subject>
<subject>05</subject>
<subject>15</subject>
<subject>60</subject>
<subject>78</subject>
<subject>80</subject>
<subject>81</subject>
<subject>82</subject>
<subject>85</subject>
<subject>86</subject>
<subject>90</subject>
<subject>92</subject>
<subject>orms</subject>
</subjects>
<related_software>
<id>4013</id>
<name>MUMPS</name>
</related_software>
<related_software>
<id>4012</id>
<name>PETSc</name>
</related_software>
<related_software>
<id>930</id>
<name>SuperLU</name>
</related_software>
<related_software>
<id>4629</id>
<name>SparseMatrix</name>
</related_software>
<related_software>
<id>503</id>
<name>LAPACK</name>
</related_software>
<related_software>
<id>679</id>
<name>PARDISO</name>
</related_software>
<related_software>
<id>426</id>
<name>hypre</name>
</related_software>
<related_software>
<id>989</id>
<name>UMFPACK</name>
</related_software>
<related_software>
<id>4089</id>
<name>METIS</name>
</related_software>
<related_software>
<id>4028</id>
<name>Trilinos</name>
</related_software>
<related_software>
<id>830</id>
<name>ScaLAPACK</name>
</related_software>
<related_software>
<id>4827</id>
<name>mctoolbox</name>
</related_software>
<related_software>
<id>6749</id>
<name>WSMP</name>
</related_software>
<related_software>
<id>3216</id>
<name>BLAS</name>
</related_software>
<related_software>
<id>418</id>
<name>HSL</name>
</related_software>
<related_software>
<id>8067</id>
<name>ML</name>
</related_software>
<related_software>
<id>2780</id>
<name>SPIKE</name>
</related_software>
<related_software>
<id>6496</id>
<name>MPI</name>
</related_software>
<related_software>
<id>9043</id>
<name>MFEM</name>
</related_software>
<related_software>
<id>17483</id>
<name>STRUMPACK</name>
</related_software>
<relatedIdentifier relationType="IsReferencedBy">2187846</relatedIdentifier>
<relatedIdentifier relationType="IsDescribedBy">https://orms.mfo.de/project@id=265.html</relatedIdentifier>
<alternateIdentifiers>
<alternateIdentifier alternateIdentifierType="url">https://zbmath.org/software/?q=si%3A2</alternateIdentifier>
</alternateIdentifiers>
</resource>
32 changes: 16 additions & 16 deletions xslt/software/xslt-software-transformation.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,45 @@
<xsl:template match="/">
<resource xsi:schemaLocation="http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4.1/metadata.xsd">
<identifier identifierType="swMATH">
<xsl:value-of select="root/result/id"/>
<xsl:value-of select="root/id"/>

</identifier>
<creators>
<xsl:value-of select="root/result/authors"/>
<xsl:value-of select="root/authors"/>

</creators>
<resourceType resourceTypeGeneral="Software"/>
<titles>
<title>
<xsl:value-of select="root/result/name"/>
<xsl:value-of select="root/name"/>
</title>
</titles>
<description>
<xsl:value-of select="root/result/description"/>
<xsl:value-of select="root/description"/>
</description>
<publicationYear>
<xsl:value-of select="root/result/standard_articles/year"/>
<xsl:value-of select="root/standard_articles/year"/>
</publicationYear>

<xsl:choose>
<xsl:when test= "root/result/source_code != ''">
<xsl:when test= "root/source_code != ''">
<!-- will be instantiated for item #1 and item #2 -->
<publisher>
<xsl:value-of select="root/result/source_code"/>
<xsl:value-of select="root/source_code"/>
</publisher>
</xsl:when>
<xsl:otherwise>
<contributor contributorType="HostingInstitution">
<xsl:value-of select="root/result/homepage" />
<xsl:value-of select="root/homepage" />
</contributor>
</xsl:otherwise>
</xsl:choose>
<rightsList>
<xsl:choose>
<xsl:when test= "root/result/license_terms != ''">
<xsl:when test= "root/license_terms != ''">
<!-- will be instantiated for item #1 and item #2 -->
<rights>
<xsl:value-of select="root/result/license_terms"/>
<xsl:value-of select="root/license_terms"/>
</rights>
</xsl:when>
<xsl:otherwise>
Expand All @@ -57,31 +57,31 @@

</rightsList>
<subjects>
<xsl:for-each select="root/result/classification">
<xsl:for-each select="root/classification">
<subject><xsl:value-of select="."/></subject>
</xsl:for-each>

<subject>
<xsl:value-of select="root/result/keywords"/>
<xsl:value-of select="root/keywords"/>
</subject>
</subjects>
<xsl:for-each select="root/result/related_software">
<xsl:for-each select="root/related_software">
<related_software>
<id><xsl:value-of select="id"/></id>
<name><xsl:value-of select="name"/></name>
</related_software>
</xsl:for-each>

<xsl:for-each select="root/result/standard_articles/id">
<xsl:for-each select="root/standard_articles/id">
<relatedIdentifier relationType="IsReferencedBy"><xsl:value-of select="."/></relatedIdentifier>
</xsl:for-each>
<relatedIdentifier relationType="IsDescribedBy">
<xsl:value-of disable-output-escaping="yes" select="concat('https://orms.mfo.de/project@', 'id=' , root/result/orms_id, '.html')"/>
<xsl:value-of disable-output-escaping="yes" select="concat('https://orms.mfo.de/project@', 'id=' , root/orms_id, '.html')"/>
</relatedIdentifier>
<alternateIdentifiers>

<alternateIdentifier alternateIdentifierType="url">
<xsl:value-of disable-output-escaping="yes" select="concat('https://zbmath.org/software/?q=si%3A',root/result/id)" />
<xsl:value-of disable-output-escaping="yes" select="concat('https://zbmath.org/software/?q=si%3A',root/id)" />
</alternateIdentifier>
</alternateIdentifiers>
</resource>
Expand Down

0 comments on commit 4e0e607

Please sign in to comment.