eprintsug / rioxx3

MIT License
0 stars 0 forks source link

Create rioxx3.xsl #1

Open jesusbagpuss opened 4 months ago

jesusbagpuss commented 4 months ago

In the screen branch there is a n00b XSL just as an example to render in the screen.

Plans for the XSL:

COAR vocabs:

Possible approach to mapping in XSL:

<!-- remember to define xmlns:coar="coar" exclude-result-prefixes="coar" in stylesheet declaration! -->
<xsl:variable name="coar-access-rights" select="document('')//coar:access_rights"/>

<coar:access_rights>
  <coar:lookup uri="c_ab4af688f83e57aa" label="AM">
    <desc>The version of a resource that has been accepted for publication. A second party takes permanent responsibility for the resource. Content and layout follow publisher’s submission requirements.</desc>
  </coar:lookup>
  ...
</coar:access_rights>

<xsl:template match="###???###">
    <xsl:variable name="value_to_lookup" select="### last-part of the COAR attribute value###"/>
    <xsl:value-of select='$coar-access-rights/coar:lookup[@uri = $value_to_lookup]/@label'/>
</xsl:template>
drn05r commented 3 months ago

Does this mappings include mappings from IDs for licences currently in the licenses namedset to be mapped to resolvable URIs for those licences. What should we do for IDs that do not have a sensible mapping? I assume we do a bit of a hack like RIOXX2 (e.g. https://www.rioxx.net/licenses/all-rights-reserved/) but in this case we would have to create URLs on the repo rather than a centralised point. Maybe we should have a set of mappings with the plugin for obvious values (e.g. cc_by_nc and anything that does not map automatically gets put under https://HOSTNAME/licenses/LICENSE_ID/