forked from geolba/tethys.frontend
- xml transformation to json for map search (leaflet)
This commit is contained in:
parent
304878c711
commit
43fb919064
7871
data/colors.xml
Normal file
7871
data/colors.xml
Normal file
File diff suppressed because it is too large
Load Diff
76
package-lock.json
generated
76
package-lock.json
generated
|
@ -22,7 +22,8 @@
|
|||
"vue-matomo": "^4.1.0",
|
||||
"vue-property-decorator": "^9.1.2",
|
||||
"vue-router": "^4.0.12",
|
||||
"xml2js": "^0.4.23"
|
||||
"xml2js": "^0.4.23",
|
||||
"xslt3": "^2.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/leaflet": "^1.7.9",
|
||||
|
@ -11194,6 +11195,22 @@
|
|||
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
|
||||
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
|
||||
},
|
||||
"node_modules/saxon-js": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmjs.org/saxon-js/-/saxon-js-2.4.0.tgz",
|
||||
"integrity": "sha512-PQ0EaoAECzYAAP6d7DZx4aRxVYLDTD3JPsEKxNpbR5q20d4/6S1cHjgaFm0O1roCxkBu4e/3jB71HL2hPz1T/w==",
|
||||
"dependencies": {
|
||||
"axios": "^0.24.0"
|
||||
}
|
||||
},
|
||||
"node_modules/saxon-js/node_modules/axios": {
|
||||
"version": "0.24.0",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz",
|
||||
"integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.14.4"
|
||||
}
|
||||
},
|
||||
"node_modules/schema-utils": {
|
||||
"version": "2.7.1",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz",
|
||||
|
@ -13397,6 +13414,26 @@
|
|||
"node": ">=4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/xslt3": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmjs.org/xslt3/-/xslt3-2.4.0.tgz",
|
||||
"integrity": "sha512-tjNKh53uG37fto7aRP1vxS2lhgGA6q+JayCjilkG/hL7Nnxby2s7MQ61PaCf7F5+WWCzcj1W2mIerBuNpZZp+A==",
|
||||
"dependencies": {
|
||||
"axios": "^0.24.0",
|
||||
"saxon-js": "^2.4.0"
|
||||
},
|
||||
"bin": {
|
||||
"xslt3": "xslt3.js"
|
||||
}
|
||||
},
|
||||
"node_modules/xslt3/node_modules/axios": {
|
||||
"version": "0.24.0",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz",
|
||||
"integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.14.4"
|
||||
}
|
||||
},
|
||||
"node_modules/xtend": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
|
||||
|
@ -21844,6 +21881,24 @@
|
|||
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
|
||||
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
|
||||
},
|
||||
"saxon-js": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmjs.org/saxon-js/-/saxon-js-2.4.0.tgz",
|
||||
"integrity": "sha512-PQ0EaoAECzYAAP6d7DZx4aRxVYLDTD3JPsEKxNpbR5q20d4/6S1cHjgaFm0O1roCxkBu4e/3jB71HL2hPz1T/w==",
|
||||
"requires": {
|
||||
"axios": "^0.24.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": {
|
||||
"version": "0.24.0",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz",
|
||||
"integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==",
|
||||
"requires": {
|
||||
"follow-redirects": "^1.14.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema-utils": {
|
||||
"version": "2.7.1",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz",
|
||||
|
@ -23540,6 +23595,25 @@
|
|||
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz",
|
||||
"integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA=="
|
||||
},
|
||||
"xslt3": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmjs.org/xslt3/-/xslt3-2.4.0.tgz",
|
||||
"integrity": "sha512-tjNKh53uG37fto7aRP1vxS2lhgGA6q+JayCjilkG/hL7Nnxby2s7MQ61PaCf7F5+WWCzcj1W2mIerBuNpZZp+A==",
|
||||
"requires": {
|
||||
"axios": "^0.24.0",
|
||||
"saxon-js": "^2.4.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": {
|
||||
"version": "0.24.0",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz",
|
||||
"integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==",
|
||||
"requires": {
|
||||
"follow-redirects": "^1.14.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"xtend": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
"vue-matomo": "^4.1.0",
|
||||
"vue-property-decorator": "^9.1.2",
|
||||
"vue-router": "^4.0.12",
|
||||
"xml2js": "^0.4.23"
|
||||
"xml2js": "^0.4.23",
|
||||
"xslt3": "^2.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/leaflet": "^1.7.9",
|
||||
|
|
|
@ -128,4 +128,14 @@ const NodePolyfillPlugin = require("node-polyfill-webpack-plugin");
|
|||
|
||||
============================ eslint ===========================================
|
||||
https://dev-yakuza.posstree.com/en/react-native/eslint-prettier-husky-lint-staged/
|
||||
https://prettier.io/docs/en/cli.html
|
||||
https://prettier.io/docs/en/cli.html
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
=================================== xslt3
|
||||
npm install xslt3 --save
|
55
src/services/datacite_2_json.xsl
Normal file
55
src/services/datacite_2_json.xsl
Normal file
|
@ -0,0 +1,55 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:array="http://www.w3.org/2005/xpath-functions/array"
|
||||
xmlns:map="http://www.w3.org/2005/xpath-functions/map"
|
||||
xmlns:math="http://www.w3.org/2005/xpath-functions/math"
|
||||
expand-text="yes"
|
||||
version="3.0">
|
||||
<!-- exclude-result-prefixes="#all" -->
|
||||
|
||||
<xsl:output method="text" indent="yes"/>
|
||||
<xsl:mode on-no-match="shallow-copy"/>
|
||||
|
||||
<!-- <xsl:variable name="datacite-titles" select="//*[name() = 'titles']"/> -->
|
||||
<xsl:variable name="datacite-records" select="//*[name() = 'resource']"/>
|
||||
|
||||
<xsl:template match="/*" mode="#all">
|
||||
<!-- <xsl:copy>
|
||||
<xsl:apply-templates select="@*, node()" mode="#current"/>
|
||||
</xsl:copy> -->
|
||||
|
||||
<!-- <xsl:for-each select="$datacite-records/*[name() = 'record']"> -->
|
||||
<xsl:for-each select="$datacite-records">
|
||||
|
||||
{{
|
||||
<!-- <xsl:variable name="identifier" select="*[name() = 'identifier']"/> -->
|
||||
<!-- identifier: <xsl:value-of select="$identifier"/>, -->
|
||||
<xsl:value-of select="*[name() = 'identifier']"/>
|
||||
}},
|
||||
|
||||
|
||||
</xsl:for-each>
|
||||
|
||||
<!-- <xsl:apply-templates select="//*[name() = 'resource']" /> -->
|
||||
|
||||
<!-- <xsl:value-of select="$datacite-titles" separator=" "/> -->
|
||||
|
||||
</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>
|
Loading…
Reference in New Issue
Block a user