- npm updates

- datcite ListRecords request to json
- xslt tansfomation in the browser
This commit is contained in:
Arno Kaimbacher 2022-06-07 17:26:35 +02:00
parent f1de1c30e7
commit 27c4563628
3 changed files with 2117 additions and 2550 deletions

4621
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -32,33 +32,24 @@
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:variable>
</xsl:variable>
<xsl:variable name="datacite-subjects" select="*[name() = 'subjects']"/>
<xsl:variable name="subjects">
<xsl:for-each select="$datacite-subjects/*[name() = 'subject']">
<xsl:value-of select="concat(normalize-space(.), ', ')"/>
</xsl:for-each>
</xsl:variable>
<!-- <xsl:value-of select="*[name() = 'identifier']"/> -->
{{
"doi": "{$identifier}",
"title": "{$main_title}"
"title": "{$main_title}",
"subject": "{$subjects}"
}},
</xsl:for-each>
<!-- <xsl:apply-templates select="//*[name() = 'resource']" /> -->
<!-- <xsl:value-of select="$datacite-titles" separator="&#x20;"/> -->
</xsl:for-each>
<!-- <xsl:value-of select="$datacite-titles" separator="&#x20;"/> -->
</xsl:template>
<!-- <xsl:template match="metadata/resource/identifier">
<xsl:value-of select="."/>
</xsl:template> -->
<xsl:template match="//*[name() = 'resource']">
<xsl:apply-templates select="identifier" />
</xsl:template>
<xsl:template match="identifier" >
<xsl:text>test</xsl:text>
<!-- <xsl:value-of select="@identifierType" />
<xsl:value-of select="string(.)"/> -->
</xsl:template>
</xsl:stylesheet>

View File

@ -183,6 +183,19 @@ class DatasetService {
const oaiDatasets = api.get<string>(apiUrl).pipe(
map(
(response: string) => {
// const parser = new DOMParser();
// const xmlDoc: XMLDocument = parser.parseFromString(response, "application/xml");
// const xslDoc = parser.parseFromString(this.xsl, "application/xml");
// const xsltProcessor = new XSLTProcessor();
// xsltProcessor.importStylesheet(xslDoc);
// console.log(xmlDoc);
// const xmlDom = xsltProcessor.transformToDocument(xmlDoc);
// const serializer = new XMLSerializer();
// const html = serializer.serializeToString(xmlDom.documentElement);
// console.log(html);
// const arrOai = new Array<OaiDataset>();
// return arrOai;
const arrOai = this.parseXML(response);