forked from museum-digital/musdb-md-xm-xsls
Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
6f3a780513 | |||
93e1523f3f | |||
a3973c5c62 | |||
93f6de4537 | |||
b75f43cbe3 | |||
5dcd88b6e1 | |||
73e749160c | |||
6c2b829daa | |||
c9c7b63434 | |||
2ff939c6db | |||
4ac221bee2 | |||
f7245187f0 | |||
12326d4d3d | |||
0ea0d77192 |
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2022
|
||||
Copyright (c) 2022-2023 museum-digital
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
22
README.md
22
README.md
|
@ -3,14 +3,30 @@
|
|||
## Formats covered thus far
|
||||
|
||||
- `LIDO 1.0`
|
||||
(Primary exchange export format)
|
||||
(Primary exchange export format). See <https://lido-schema.org>
|
||||
- LIDO 1.1
|
||||
Updated version of the LIDO standard, as of 2022. See <https://lido-schema.org>
|
||||
- EODEM
|
||||
A LIDO profile (based on LIDO 1.1) specifically designed for the automation of the exchange of loan object information. Contrary to LIDO, it thus also covers some internal fields. See: <https://cidoc.mini.icom.museum/working-groups/documentation-standards/eodem-home/>
|
||||
|
||||
## Repository structure
|
||||
|
||||
### /src
|
||||
### [/src](./src)
|
||||
|
||||
Contains the relevant .xsl files used for converting md:xml to other formats.
|
||||
|
||||
### /sample
|
||||
#### [/src/schemas](./src/schemas)
|
||||
|
||||
This directory contains schemas for validating the different formats.
|
||||
|
||||
#### [/src/selections](./src/selections)
|
||||
|
||||
This directory contains JSON files listing which bits and pieces should be made available during an export from musdb when exporting to a given format. E.g., LIDO cannot represent internal information like insurance values. It thus does not make sense to export such information during the export to md:xml pre-transformation in the first place.
|
||||
|
||||
### [/sample](./sample)
|
||||
|
||||
Here you can find sample mx:xml files.
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for the full license text.
|
||||
|
|
|
@ -34,6 +34,64 @@
|
|||
</xsl:if>
|
||||
<lido:objectClassificationWrap>
|
||||
<lido:objectWorkTypeWrap>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="
|
||||
tagSet[0]/relation_type[. = 'object_type']
|
||||
| tagSet[1]/relation_type[. = 'object_type']
|
||||
| tagSet[2]/relation_type[. = 'object_type']
|
||||
| tagSet[3]/relation_type[. = 'object_type']
|
||||
| tagSet[4]/relation_type[. = 'object_type']
|
||||
| tagSet[5]/relation_type[. = 'object_type']
|
||||
| tagSet[6]/relation_type[. = 'object_type']
|
||||
| tagSet[7]/relation_type[. = 'object_type']
|
||||
| tagSet[8]/relation_type[. = 'object_type']
|
||||
| tagSet[9]/relation_type[. = 'object_type']
|
||||
| tagSet[10]/relation_type[. = 'object_type']
|
||||
| tagSet[11]/relation_type[. = 'object_type']
|
||||
| tagSet[12]/relation_type[. = 'object_type']
|
||||
| tagSet[13]/relation_type[. = 'object_type']
|
||||
| tagSet[14]/relation_type[. = 'object_type']
|
||||
| tagSet[15]/relation_type[. = 'object_type']
|
||||
| tagSet[16]/relation_type[. = 'object_type']
|
||||
| tagSet[17]/relation_type[. = 'object_type']
|
||||
| tagSet[18]/relation_type[. = 'object_type']
|
||||
">
|
||||
|
||||
<!-- objectWorkType exists via tags -->
|
||||
<xsl:for-each select="tagSet/tag_id">
|
||||
<xsl:if test="../relation_type = 'object_type'">
|
||||
<lido:objectWorkType>
|
||||
<xsl:for-each select="../noda_tag_Set/noda_source">
|
||||
<xsl:if test="string-length(../noda_link)!=0">
|
||||
<lido:conceptID>
|
||||
<xsl:attribute name="lido:source">
|
||||
<xsl:value-of select="../noda_source"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="lido:type">uri</xsl:attribute>
|
||||
<xsl:value-of select="../noda_link"/>
|
||||
</lido:conceptID>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="../tag_name">
|
||||
<lido:term>
|
||||
<xsl:attribute name="lido:addedSearchTerm">no</xsl:attribute>
|
||||
<xsl:if test="string-length(./@lang)!=0">
|
||||
<xsl:attribute name="xml:lang">
|
||||
<xsl:value-of select="./@lang"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="."/>
|
||||
<xsl:variable name="objektartschlagwort" select="." />
|
||||
</lido:term>
|
||||
</xsl:for-each>
|
||||
</lido:objectWorkType>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
|
||||
<lido:objectWorkType>
|
||||
<xsl:for-each select="objektart_gnd">
|
||||
<lido:conceptID>
|
||||
|
@ -98,6 +156,11 @@
|
|||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
</lido:objectWorkType>
|
||||
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
|
||||
</lido:objectWorkTypeWrap>
|
||||
<lido:classificationWrap>
|
||||
<xsl:for-each select="collectionSet">
|
||||
|
|
154
src/lido-1.0.xsl
154
src/lido-1.0.xsl
|
@ -33,6 +33,64 @@
|
|||
</xsl:if>
|
||||
<lido:objectClassificationWrap>
|
||||
<lido:objectWorkTypeWrap>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="
|
||||
tagSet[0]/relation_type[. = 'object_type']
|
||||
| tagSet[1]/relation_type[. = 'object_type']
|
||||
| tagSet[2]/relation_type[. = 'object_type']
|
||||
| tagSet[3]/relation_type[. = 'object_type']
|
||||
| tagSet[4]/relation_type[. = 'object_type']
|
||||
| tagSet[5]/relation_type[. = 'object_type']
|
||||
| tagSet[6]/relation_type[. = 'object_type']
|
||||
| tagSet[7]/relation_type[. = 'object_type']
|
||||
| tagSet[8]/relation_type[. = 'object_type']
|
||||
| tagSet[9]/relation_type[. = 'object_type']
|
||||
| tagSet[10]/relation_type[. = 'object_type']
|
||||
| tagSet[11]/relation_type[. = 'object_type']
|
||||
| tagSet[12]/relation_type[. = 'object_type']
|
||||
| tagSet[13]/relation_type[. = 'object_type']
|
||||
| tagSet[14]/relation_type[. = 'object_type']
|
||||
| tagSet[15]/relation_type[. = 'object_type']
|
||||
| tagSet[16]/relation_type[. = 'object_type']
|
||||
| tagSet[17]/relation_type[. = 'object_type']
|
||||
| tagSet[18]/relation_type[. = 'object_type']
|
||||
">
|
||||
|
||||
<!-- objectWorkType exists via tags -->
|
||||
<xsl:for-each select="tagSet/tag_id">
|
||||
<xsl:if test="../relation_type = 'object_type'">
|
||||
<lido:objectWorkType>
|
||||
<xsl:for-each select="../noda_tag_Set/noda_source">
|
||||
<xsl:if test="string-length(../noda_link)!=0">
|
||||
<lido:conceptID>
|
||||
<xsl:attribute name="lido:source">
|
||||
<xsl:value-of select="../noda_source"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="lido:type">uri</xsl:attribute>
|
||||
<xsl:value-of select="../noda_link"/>
|
||||
</lido:conceptID>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="../tag_name">
|
||||
<lido:term>
|
||||
<xsl:attribute name="lido:addedSearchTerm">no</xsl:attribute>
|
||||
<xsl:if test="string-length(./@lang)!=0">
|
||||
<xsl:attribute name="xml:lang">
|
||||
<xsl:value-of select="./@lang"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="."/>
|
||||
<xsl:variable name="objektartschlagwort" select="." />
|
||||
</lido:term>
|
||||
</xsl:for-each>
|
||||
</lido:objectWorkType>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
|
||||
<lido:objectWorkType>
|
||||
<xsl:for-each select="objektart_gnd">
|
||||
<lido:conceptID>
|
||||
|
@ -97,6 +155,11 @@
|
|||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
</lido:objectWorkType>
|
||||
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
|
||||
</lido:objectWorkTypeWrap>
|
||||
<lido:classificationWrap>
|
||||
<xsl:for-each select="collectionSet">
|
||||
|
@ -676,7 +739,8 @@
|
|||
<xsl:attribute name="xml:lang">
|
||||
<xsl:value-of select="./@lang"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="."/> (?)
|
||||
<xsl:value-of select="."/>
|
||||
<xsl:text> (?)</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:if test="string-length(./@lang) = 0"><xsl:value-of select="."/> (?)</xsl:if>
|
||||
</lido:displayDate>
|
||||
|
@ -721,10 +785,12 @@
|
|||
<xsl:attribute name="xml:lang">
|
||||
<xsl:value-of select="./@lang"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="."/> (?)
|
||||
<xsl:value-of select="."/>
|
||||
<xsl:text> (?)</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:if test="string-length(./@lang) = 0">
|
||||
<xsl:value-of select="."/> (?)
|
||||
<xsl:value-of select="."/>
|
||||
<xsl:text> (?)</xsl:text>
|
||||
</xsl:if>
|
||||
</lido:displayPlace>
|
||||
</xsl:for-each>
|
||||
|
@ -862,6 +928,43 @@
|
|||
</lido:materialsTech>
|
||||
</lido:eventMaterialsTech>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:for-each select="tagSet/tag_id">
|
||||
<xsl:if test="../relation_type = 'material'">
|
||||
<lido:eventMaterialsTech>
|
||||
<lido:materialsTech>
|
||||
<lido:termMaterialsTech lido:type="material">
|
||||
<xsl:for-each select="../noda_tag_Set/noda_source">
|
||||
<xsl:if test="string-length(../noda_link)!=0">
|
||||
<lido:conceptID>
|
||||
<xsl:attribute name="lido:source">
|
||||
<xsl:value-of select="../noda_source"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="lido:type">uri</xsl:attribute>
|
||||
<xsl:value-of select="../noda_link"/>
|
||||
</lido:conceptID>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="../tag_name">
|
||||
<lido:term>
|
||||
<xsl:attribute name="lido:addedSearchTerm">no</xsl:attribute>
|
||||
<xsl:if test="string-length(./@lang)!=0">
|
||||
<xsl:attribute name="xml:lang">
|
||||
<xsl:value-of select="./@lang"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="."/>
|
||||
</lido:term>
|
||||
</xsl:for-each>
|
||||
</lido:termMaterialsTech>
|
||||
</lido:materialsTech>
|
||||
</lido:eventMaterialsTech>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
|
||||
|
||||
|
||||
|
||||
<xsl:if test="technik2!=''">
|
||||
<lido:eventMaterialsTech>
|
||||
<lido:materialsTech>
|
||||
|
@ -873,6 +976,40 @@
|
|||
</lido:materialsTech>
|
||||
</lido:eventMaterialsTech>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:for-each select="tagSet/tag_id">
|
||||
<xsl:if test="../relation_type = 'technique'">
|
||||
<lido:eventMaterialsTech>
|
||||
<lido:materialsTech>
|
||||
<lido:termMaterialsTech lido:type="technique">
|
||||
<xsl:for-each select="../noda_tag_Set/noda_source">
|
||||
<xsl:if test="string-length(../noda_link)!=0">
|
||||
<lido:conceptID>
|
||||
<xsl:attribute name="lido:source">
|
||||
<xsl:value-of select="../noda_source"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="lido:type">uri</xsl:attribute>
|
||||
<xsl:value-of select="../noda_link"/>
|
||||
</lido:conceptID>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="../tag_name">
|
||||
<lido:term>
|
||||
<xsl:attribute name="lido:addedSearchTerm">no</xsl:attribute>
|
||||
<xsl:if test="string-length(./@lang)!=0">
|
||||
<xsl:attribute name="xml:lang">
|
||||
<xsl:value-of select="./@lang"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="."/>
|
||||
</lido:term>
|
||||
</xsl:for-each>
|
||||
</lido:termMaterialsTech>
|
||||
</lido:materialsTech>
|
||||
</lido:eventMaterialsTech>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
|
||||
</lido:event>
|
||||
</lido:eventSet>
|
||||
</xsl:if>
|
||||
|
@ -1102,10 +1239,12 @@
|
|||
<xsl:attribute name="xml:lang">
|
||||
<xsl:value-of select="./@lang"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="."/> (?)
|
||||
<xsl:value-of select="."/>
|
||||
<xsl:text> (?)</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:if test="string-length(./@lang) = 0">
|
||||
<xsl:value-of select="."/> (?)
|
||||
<xsl:value-of select="."/>
|
||||
<xsl:text> (?)</xsl:text>
|
||||
</xsl:if>
|
||||
</lido:displayPlace>
|
||||
</xsl:for-each>
|
||||
|
@ -1191,6 +1330,7 @@
|
|||
</xsl:if>
|
||||
|
||||
<xsl:for-each select="tagSet/tag_id">
|
||||
<xsl:if test="(../relation_type != 'object_type') and (../relation_type != 'material') and (../relation_type != 'technique')">
|
||||
<lido:subjectSet>
|
||||
<lido:subject>
|
||||
<lido:subjectConcept>
|
||||
|
@ -1219,11 +1359,11 @@
|
|||
</lido:subjectConcept>
|
||||
</lido:subject>
|
||||
</lido:subjectSet>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</lido:subjectWrap>
|
||||
|
||||
<lido:relatedWorksWrap>
|
||||
|
||||
<xsl:for-each select="vergleichsobjekte2">
|
||||
<lido:relatedWorkSet>
|
||||
<lido:relatedWork>
|
||||
|
@ -1758,7 +1898,7 @@
|
|||
</xsl:for-each>
|
||||
</lido:resourceRepresentation>
|
||||
<lido:resourceRepresentation>
|
||||
<xsl:attribute name="lido:type">text</xsl:attribute>
|
||||
<xsl:attribute name="lido:type">provided_text</xsl:attribute>
|
||||
<xsl:for-each select="../resource_location">
|
||||
<xsl:if test="position() = 1">
|
||||
<lido:linkResource>
|
||||
|
|
|
@ -33,6 +33,64 @@
|
|||
</xsl:if>
|
||||
<lido:objectClassificationWrap>
|
||||
<lido:objectWorkTypeWrap>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="
|
||||
tagSet[0]/relation_type[. = 'object_type']
|
||||
| tagSet[1]/relation_type[. = 'object_type']
|
||||
| tagSet[2]/relation_type[. = 'object_type']
|
||||
| tagSet[3]/relation_type[. = 'object_type']
|
||||
| tagSet[4]/relation_type[. = 'object_type']
|
||||
| tagSet[5]/relation_type[. = 'object_type']
|
||||
| tagSet[6]/relation_type[. = 'object_type']
|
||||
| tagSet[7]/relation_type[. = 'object_type']
|
||||
| tagSet[8]/relation_type[. = 'object_type']
|
||||
| tagSet[9]/relation_type[. = 'object_type']
|
||||
| tagSet[10]/relation_type[. = 'object_type']
|
||||
| tagSet[11]/relation_type[. = 'object_type']
|
||||
| tagSet[12]/relation_type[. = 'object_type']
|
||||
| tagSet[13]/relation_type[. = 'object_type']
|
||||
| tagSet[14]/relation_type[. = 'object_type']
|
||||
| tagSet[15]/relation_type[. = 'object_type']
|
||||
| tagSet[16]/relation_type[. = 'object_type']
|
||||
| tagSet[17]/relation_type[. = 'object_type']
|
||||
| tagSet[18]/relation_type[. = 'object_type']
|
||||
">
|
||||
|
||||
<!-- objectWorkType exists via tags -->
|
||||
<xsl:for-each select="tagSet/tag_id">
|
||||
<xsl:if test="../relation_type = 'object_type'">
|
||||
<lido:objectWorkType>
|
||||
<xsl:for-each select="../noda_tag_Set/noda_source">
|
||||
<xsl:if test="string-length(../noda_link)!=0">
|
||||
<lido:conceptID>
|
||||
<xsl:attribute name="lido:source">
|
||||
<xsl:value-of select="../noda_source"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="lido:type">uri</xsl:attribute>
|
||||
<xsl:value-of select="../noda_link"/>
|
||||
</lido:conceptID>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="../tag_name">
|
||||
<lido:term>
|
||||
<xsl:attribute name="lido:addedSearchTerm">no</xsl:attribute>
|
||||
<xsl:if test="string-length(./@lang)!=0">
|
||||
<xsl:attribute name="xml:lang">
|
||||
<xsl:value-of select="./@lang"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="."/>
|
||||
<xsl:variable name="objektartschlagwort" select="." />
|
||||
</lido:term>
|
||||
</xsl:for-each>
|
||||
</lido:objectWorkType>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
|
||||
<lido:objectWorkType>
|
||||
<xsl:for-each select="objektart_gnd">
|
||||
<lido:conceptID>
|
||||
|
@ -97,6 +155,11 @@
|
|||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
</lido:objectWorkType>
|
||||
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
|
||||
</lido:objectWorkTypeWrap>
|
||||
<lido:classificationWrap>
|
||||
<xsl:for-each select="collectionSet">
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"show_sammlungen": true,
|
||||
"show_serien": true,
|
||||
"show_acquisitions": false,
|
||||
"show_exhibitions": false,
|
||||
"show_loans": false,
|
||||
"show_ereignisse": true,
|
||||
|
@ -9,6 +10,7 @@
|
|||
"show_markings": true,
|
||||
"show_transcripts": true,
|
||||
"show_links": true,
|
||||
"show_object_to_object_links": true,
|
||||
"show_images": true,
|
||||
"show_hidden_images": false,
|
||||
"show_objekt_inventarnr": true,
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"show_sammlungen": true,
|
||||
"show_serien": true,
|
||||
"show_acquisitions": false,
|
||||
"show_exhibitions": false,
|
||||
"show_loans": false,
|
||||
"show_ereignisse": true,
|
||||
|
@ -9,6 +10,7 @@
|
|||
"show_markings": true,
|
||||
"show_transcripts": true,
|
||||
"show_links": true,
|
||||
"show_object_to_object_links": true,
|
||||
"show_images": true,
|
||||
"show_hidden_images": false,
|
||||
"show_objekt_inventarnr": true,
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"show_sammlungen": true,
|
||||
"show_serien": true,
|
||||
"show_acquisitions": false,
|
||||
"show_exhibitions": false,
|
||||
"show_loans": false,
|
||||
"show_ereignisse": true,
|
||||
|
@ -9,6 +10,7 @@
|
|||
"show_markings": true,
|
||||
"show_transcripts": true,
|
||||
"show_links": true,
|
||||
"show_object_to_object_links": true,
|
||||
"show_images": true,
|
||||
"show_hidden_images": false,
|
||||
"show_objekt_inventarnr": true,
|
||||
|
|
Loading…
Reference in New Issue
Block a user