- small changes for oai_iso19139.xslt

- oai_datacite.xslt version 3.0
This commit is contained in:
Arno Kaimbacher 2023-04-05 10:03:54 +02:00
parent 5b6f81c34d
commit cb40b2c7dc
7 changed files with 55 additions and 52 deletions

View File

@ -470,7 +470,7 @@
</gmd:keyword> </gmd:keyword>
</xsl:for-each> </xsl:for-each>
<gmd:type> <gmd:type>
<MD_KeywordTypeCode xmlns="http://www.isotc211.org/2005/gmd" codeList="https://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MD_KeywordTypeCode" codeListValue="theme">theme</MD_KeywordTypeCode> <gmd:MD_KeywordTypeCode xmlns="http://www.isotc211.org/2005/gmd" codeList="https://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MD_KeywordTypeCode" codeListValue="theme">theme</gmd:MD_KeywordTypeCode>
</gmd:type> </gmd:type>
</gmd:MD_Keywords> </gmd:MD_Keywords>
</gmd:descriptiveKeywords> </gmd:descriptiveKeywords>
@ -697,45 +697,45 @@
<!-- <gmd:onLine> --> <!-- <gmd:onLine> -->
<xsl:template name="datacite_identifier"> <xsl:template name="datacite_identifier">
<xsl:for-each select="*[name() = 'Identifier']"> <xsl:for-each select="*[name() = 'Identifier']">
<xsl:variable name="identifier" select="."/> <xsl:variable name="identifier" select="."/>
<xsl:if test="starts-with($identifier/@Value, 'doi:') or $identifier/@Type = 'Doi' or starts-with($identifier/@Value, 'http://')"> <xsl:if test="starts-with($identifier/@Value, 'doi:') or $identifier/@Type = 'Doi' or starts-with($identifier/@Value, 'http://')">
<gmd:onLine> <gmd:onLine>
<gmd:CI_OnlineResource> <gmd:CI_OnlineResource>
<gmd:linkage> <gmd:linkage>
<gmd:URL> <gmd:URL>
<xsl:choose> <xsl:choose>
<xsl:when test="starts-with($identifier/@Value, 'doi:')"> <xsl:when test="starts-with($identifier/@Value, 'doi:')">
<!-- stower http auf https gesetzt --> <!-- stower http auf https gesetzt -->
<xsl:value-of select="concat('http://dx.doi.org/', substring-after($identifier/@Value, 'doi:'))"/> <xsl:value-of select="concat('http://dx.doi.org/', substring-after($identifier/@Value, 'doi:'))"/>
</xsl:when> </xsl:when>
<xsl:when test="$identifier/@Type = 'Doi'"> <xsl:when test="$identifier/@Type = 'Doi'">
<xsl:value-of select="concat('http://dx.doi.org/', normalize-space($identifier/@Value))"/> <xsl:value-of select="concat('http://dx.doi.org/', normalize-space($identifier/@Value))"/>
</xsl:when> </xsl:when>
<xsl:when test="starts-with($identifier/@Value, 'http://')"> <xsl:when test="starts-with($identifier/@Value, 'http://')">
<xsl:value-of select="normalize-space($identifier/@Value)"/> <xsl:value-of select="normalize-space($identifier/@Value)"/>
</xsl:when> </xsl:when>
</xsl:choose> </xsl:choose>
</gmd:URL> </gmd:URL>
</gmd:linkage> </gmd:linkage>
<gmd:protocol> <gmd:protocol>
<gco:CharacterString>WWW:LINK-1.0-http--link</gco:CharacterString> <gco:CharacterString>WWW:LINK-1.0-http--link</gco:CharacterString>
</gmd:protocol> </gmd:protocol>
<gmd:name> <gmd:name>
<gco:CharacterString>Landing Page</gco:CharacterString> <gco:CharacterString>Landing Page</gco:CharacterString>
</gmd:name> </gmd:name>
<gmd:description> <gmd:description>
<gco:CharacterString> <gco:CharacterString>
<xsl:value-of select="normalize-space(string( <xsl:value-of select="normalize-space(string(
'Link to DOI landing page or data facility landing page if no DOI is assigned.'))"/> 'Link to DOI landing page or data facility landing page if no DOI is assigned.'))"/>
</gco:CharacterString> </gco:CharacterString>
</gmd:description> </gmd:description>
<gmd:function> <gmd:function>
<gmd:CI_OnLineFunctionCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_OnLineFunctionCode" codeListValue="information">information</gmd:CI_OnLineFunctionCode> <gmd:CI_OnLineFunctionCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_OnLineFunctionCode" codeListValue="information">information</gmd:CI_OnLineFunctionCode>
</gmd:function> </gmd:function>
</gmd:CI_OnlineResource> </gmd:CI_OnlineResource>
</gmd:onLine> </gmd:onLine>
</xsl:if> </xsl:if>
</xsl:for-each> </xsl:for-each>
</xsl:template> </xsl:template>
@ -775,7 +775,7 @@
<gmd:scope> <gmd:scope>
<gmd:DQ_Scope> <gmd:DQ_Scope>
<gmd:level> <gmd:level>
<MD_ScopeCode xmlns="http://www.isotc211.org/2005/gmd" codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MD_ScopeCode" codeListValue="dataset" /> <gmd:MD_ScopeCode xmlns="http://www.isotc211.org/2005/gmd" codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#MD_ScopeCode" codeListValue="dataset" />
</gmd:level> </gmd:level>
<gmd:levelDescription xmlns:gco="http://www.isotc211.org/2005/gco" gco:nilReason="inapplicable" /> <gmd:levelDescription xmlns:gco="http://www.isotc211.org/2005/gco" gco:nilReason="inapplicable" />
</gmd:DQ_Scope> </gmd:DQ_Scope>
@ -795,7 +795,7 @@
<gco:Date xmlns:gco="http://www.isotc211.org/2005/gco">2010-12-08</gco:Date> <gco:Date xmlns:gco="http://www.isotc211.org/2005/gco">2010-12-08</gco:Date>
</gmd:date> </gmd:date>
<gmd:dateType> <gmd:dateType>
<CI_DateTypeCode xmlns="http://www.isotc211.org/2005/gmd" codeList="https://standards.iso.org/iso/19139/resources/gmxCodelists.xml#CI_DateTypeCode" codeListValue="publication" /> <gmd:CI_DateTypeCode xmlns="http://www.isotc211.org/2005/gmd" codeList="https://standards.iso.org/iso/19139/resources/gmxCodelists.xml#CI_DateTypeCode" codeListValue="publication" />
</gmd:dateType> </gmd:dateType>
</gmd:CI_Date> </gmd:CI_Date>
</gmd:date> </gmd:date>

View File

@ -52,8 +52,11 @@
<!-- main template for is 19139 --> <!-- main template for is 19139 -->
<xsl:template match="Rdr_Dataset" mode="iso19139"> <xsl:template match="Rdr_Dataset" mode="iso19139">
<gmd:MD_Metadata xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gml="http://www.opgeris.net/gml/3.2" xmlns:gmx="http://www.isotc211.org/2005/gmx" <!-- <gmd:MD_Metadata xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gml="http://www.opgeris.net/gml/3.2" xmlns:gmx="http://www.isotc211.org/2005/gmx"
xsi:schemaLocation="http://www.isotc211.org/2005/gmd https://www.isotc211.org/2005/gmd/metadataApplication.xsd http://www.isotc211.org/2005/gmd http://schemas.opengis.net/iso/19139/20060504/gmd/gmd.xsd http://www.isotc211.org/2005/gmx http://schemas.opengis.net/iso/19139/20060504/gmx/gmx.xsd"> xsi:schemaLocation="http://www.isotc211.org/2005/gmd https://www.isotc211.org/2005/gmd/metadataApplication.xsd http://www.isotc211.org/2005/gmd http://schemas.opengis.net/iso/19139/20060504/gmd/gmd.xsd http://www.isotc211.org/2005/gmx http://schemas.opengis.net/iso/19139/20060504/gmx/gmx.xsd"> -->
<gmd:MD_Metadata xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:srv="http://www.isotc211.org/2005/srv" xmlns:gmx="http://www.isotc211.org/2005/gmx"
xmlns:gts="http://www.isotc211.org/2005/gts" xmlns:gsr="http://www.isotc211.org/2005/gsr" xmlns:gmi="http://www.isotc211.org/2005/gmi" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xlink="http://www.w3.org/1999/xlink"
xsi:schemaLocation="http://www.isotc211.org/2005/gmd http://schemas.opengis.net/iso/19139/20060504/gmd/gmd.xsd http://www.isotc211.org/2005/gmx http://schemas.opengis.net/iso/19139/20060504/gmx/gmx.xsd http://www.isotc211.org/2005/srv http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd">
<!-- gmd:fileIdentifier --> <!-- gmd:fileIdentifier -->
<xsl:if test="Identifier"> <xsl:if test="Identifier">

View File

@ -28,7 +28,7 @@
* xml as required by the OAI-PMH protocol. * xml as required by the OAI-PMH protocol.
*/ */
--> -->
<xsl:stylesheet version="1.0" <xsl:stylesheet version="3.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/"

File diff suppressed because one or more lines are too long

View File

@ -216,7 +216,7 @@ export class OaiController {
} }
protected handleIdentify() { protected handleIdentify() {
const email = process.env.OAI_EMAIL ||"repository@geosphere.at"; const email = process.env.OAI_EMAIL || "repository@geosphere.at";
const repositoryName = "Tethys RDR"; const repositoryName = "Tethys RDR";
const repIdentifier = "tethys.at"; const repIdentifier = "tethys.at";
const sampleIdentifier = "oai:" + repIdentifier + ":1"; //$this->_configuration->getSampleIdentifier(); const sampleIdentifier = "oai:" + repIdentifier + ":1"; //$this->_configuration->getSampleIdentifier();

View File

@ -3,8 +3,8 @@ import DocumentXmlCache from "../models/DocumentXmlCache";
import { XMLBuilder } from "xmlbuilder2/lib/interfaces"; import { XMLBuilder } from "xmlbuilder2/lib/interfaces";
import Dataset from "../models/Dataset"; import Dataset from "../models/Dataset";
import Logger from "jet-logger"; import Logger from "jet-logger";
import { create } from "xmlbuilder2"; // import { create } from "xmlbuilder2";
import dayjs from "dayjs"; // import dayjs from "dayjs";
/** /**
* This is the description of the interface * This is the description of the interface
@ -107,9 +107,9 @@ export default class XmlModel {
} }
public async getDomDocument() { public async getDomDocument() {
const dataset = this.config.model; // const dataset = this.config.model;
let domDocument: XMLBuilder | null = await this.getDomDocumentFromXmlCache(); const domDocument: XMLBuilder | null = await this.getDomDocumentFromXmlCache();
if (domDocument) { if (domDocument) {
return domDocument; return domDocument;
} else { } else {

View File

@ -255,6 +255,6 @@ export function initModels() {
Coverage: Coverage, Coverage: Coverage,
Subject: Subject, Subject: Subject,
License: License, License: License,
DocumentPersons: DocumentPersons DocumentPersons: DocumentPersons,
}; };
} }