gbv / cmo

Corpus Musicae Ottomanicae
GNU General Public License v3.0
6 stars 0 forks source link

Implement MEI 4.0 Header #160

Closed fabiancremer closed 4 years ago

fabiancremer commented 5 years ago

MEI launched a new version: 4.0, Release Notes available on GitHub: https://github.com/music-encoding/music-encoding/releases/tag/v4.0.0

Changes affecting CMO data model: https://gitlab.gwdg.de/perspectivia.net/cmo/issues/32

We need to:

Changes on entity level are repeated here.

fabiancremer commented 5 years ago

Expression

  1. <titleStmt> muss entfernt werden:
    Sämtliche <title>-Elemente und <composer> sind direkte Kinder von <expression>.
  2. language/@authority wird zu language/@auth
  3. Anpassen der Klassifikationen, siehe unten

Im Falle von zyklischen Stücken muss nichts zusätzlich geändert werden, da die zugehörigen Teile nicht innerhalb des MEI-Containers referenziert werden. Ansonsten würde auch hier von <componentGrp> auf <componentList> gewechselt werden.

Beispiele:

Kleines Beispiel für <componentList>:

<componentList>
    <expression codedval="cmo_expression_00000079">
        <title></title>
    </expression>
    <!-- etc. ... -->
</componentList>
fabiancremer commented 5 years ago

Anpassung der Klassifikation

  1. Element <classCode> entfällt komplett.
  2. Der Wert von classCode/@authURI wird in termList/@class übernommen.

Beispiel

Vorher:

<mei:classCode authURI="http://www.corpus-musicae-ottomanicae.de/api/v1/classifications/cmo_usuler" xml:id="id13ced91d"/>
<mei:termList classcode="#id13ced91d">
    <mei:term>us-48625938-3-5f58ec7</mei:term>
</mei:termList>

Nachher:

<mei:termList class="http://www.corpus-musicae-ottomanicae.de/api/v1/classifications/cmo_usuler">
    <mei:term>us-48625938-3-5f58ec7</mei:term>
</mei:termList>
fabiancremer commented 5 years ago

Work

  1. Leeres <title>-Element nach <identifier> einfügen, um valide zu sein.
  2. <expression> benötigt ebenfalls ein leeres <title>-Element um valide zu sein:
    <expressionList>
    <expression data="cmo_expression_00001901" label="CMO_NE204, p. 65">
        <title/>
    </expression>
    </expressionList>
  3. Anpassung der Klassifikation, siehe [oben].
  4. expressionList/expression/@data erzeugt eine Schematron-Warnung:

    The value in @data should correspond to the @xml:id attribute of a descendant of the music element.

-> for identifying the expressions use codeval and auth.uri:

<expression data="cmo_expression_00001901" label="CMO_NE204, p. 65">
<expression codeval="cmo_expression_00001901" auth.uri="https://corpus-musicae-ottomanicae.de/receive/" label="CMO_NE204, p. 65">

codedval(optional) A value that represents or identifies other data. Often, it is a primary key in the database or a unique value in the coded list identified by the auth or auth.uri attributes. One or more values of datatype NMTOKEN, separated by spaces.
auth.uri(optional) A web-accessible location of the controlled vocabulary or other authoritative source of identification or definition for this element or its content. This attribute may contain a complete URI or a partial URI which is completed by the value of the codedval attribute. Value conforms to data.URI.

Siehe MEI 4.0 Guidelines: expression

Beispiel:

fabiancremer commented 5 years ago

Source

  1. <source> wird in <manifestation> umbenannt
  2. language/@authority wird zu language/@auth
  3. Anpassung der Klassifikation, siehe oben.
  4. relation/@n: Keine Leerzeichen in @n erlaubt!!!
  5. <componentGrp> wird durch <componentList> ersetzt.
  6. Innerhalb von <componentList> müssen die Kinder ebenfalls von <source> in <manifestation> geändert.

Anmerkung: Ja, obwohl in <work> und <expression> das Element <titleStmt> entfernt wurde, ist es für die Beschreibung von Manifestations noch vorhanden!

scriptDesc

In MEI 4.0 gibt s mittlerweile als Teile von <physDesc> das Element <scriptDesc> (übernommen aus TEI); siehe Referenz & Dokumentation.
Für valides MEI 4.0 sind Anpassungen an der Eingabe nicht notwendig. Es stellt sich lediglich die Frage, ob man auf eine derart differenzierte Beschreibung der verwendeten Schriften umstellen möchte...

Beispiele:

fabiancremer commented 5 years ago

Person

Keine Änderung notwendig
cmo_person_00000120_MEI401.xml

kkrebs commented 5 years ago

https://corpus-musicae-ottomanicae.de/receive/cmo_source_00000028?XSL.Style=xml <relation xmlns="http://www.music-encoding.org/ns/mei" rel="isEmbodimentOf" target="cmo_expression_00002912" n="p. 001" /> wird <relation xmlns="http://www.music-encoding.org/ns/mei" rel="isEmbodimentOf" target="cmo_expression_00002912" n="p.001" />

fabiancremer commented 5 years ago

https://corpus-musicae-ottomanicae.de/receive/cmo_source_00000028?XSL.Style=xml <relation xmlns="http://www.music-encoding.org/ns/mei" rel="isEmbodimentOf" target="cmo_expression_00002912" n="p. 001" /> wird <relation xmlns="http://www.music-encoding.org/ns/mei" rel="isEmbodimentOf" target="cmo_expression_00002912" n="p.001" />

Yes.

sebhofmann commented 4 years ago

The Migration commands are:

select objects with solr query objectType:expression in core main
execute for selected migrate to mei4 {x}
select objects with solr query objectType:source in core main
execute for selected migrate to mei4 {x}
select objects with solr query objectType:work in core main
execute for selected migrate to mei4 {x}
annplaksin commented 4 years ago

I found some minor validation errors while testing:

Because of the necessity of having at least an emtpy <title> tag within work, we could add a title field to the work object. But I would refrain from making the title mandatory. If the field contains no text, then the element should be an empty element. Would this be possible?

annplaksin commented 4 years ago

When adding an expression to a source, there is no check for spaces the field for the page numbers (will become @n) . This leads currently to a crash. Would it be possible to have some consistency check to prevent spaces?