Edirom / MerMEId

Metadata Editor and Repository for MEI Data

Home Page:https://mermeid.edirom.de/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Extent" does not save

halhosar opened this issue · comments

I have encountered two versions of the same problem, namely the inability to use the extent input for either complete works or separate movements. This is a function that is very important for the Wanhal edition, since one often can find versions of his sacred works where the same movement can exist in different lengths.

When trying to use the extent function for the work as a whole (or for complete variants of a work) the input box disappears when saving the file, and I see no evidence of it having been saved in the XML file:

bilde

When using the "duration" function for particular movements, the input is saved, but does not show up in the entry itself:

bilde
bilde

I assume that these may be two different issues, but since they are used in tandem in the Wanhal catalogue I present them together here.

I can confirm the two issue, having tested with current installation at mermeid.edirom.de.

Some debugging at dev meeting:

  • inserted extent directly into XML and then it is displayed in the forms
  • when value is changed in form and then saved, input disappears again

We have had similar issues that were caused by this template at line 266 in filter_get.xsl (in this case, "bars" not being part of the list); I ended up commenting out the whole template.

Edit/clarification: as far as I remember, it was the absence of the unit-attribute that did not play well with the forms / saving.

  <!-- Clean up past issues -->
  <xsl:template match="m:extent[@unit] | m:dimensions[@unit]" mode="mei2html">
    <!-- append non-valid @unit values to the element content and omit the unit attribute -->
    <xsl:choose>
      <xsl:when test="@unit 
        and @unit!=''
        and @unit!='byte' 
        and @unit!='char' 
        and @unit!='cm' 
        and @unit!='in' 
        and @unit!='issue' 
        and @unit!='mm' 
        and @unit!='page' 
        and @unit!='pc' 
        and @unit!='pt' 
        and @unit!='px' 
        and @unit!='record' 
        and @unit!='vol' 
        and @unit!='vu'">
        <xsl:element name="{name(.)}">
          <xsl:apply-templates select="@*[name()!='unit']"/>
          <xsl:attribute name="unit"/>
          <xsl:apply-templates select="*|text()"/><xsl:value-of select="concat(' ',@unit)"/></xsl:element>
      </xsl:when>
      <xsl:otherwise>
        <xsl:element name="{name(.)}">
          <xsl:apply-templates select="@*|*|text()"/>
        </xsl:element>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>