majlis-erc / manuForma

The manuForma application is designed to make TEI data creation and distributed editing faster and easier.
6 stars 1 forks source link

Title in heritage data collapsible only sometimes displayed #519

Closed mMoliere closed 7 months ago

mMoliere commented 9 months ago

@wsalesky We want the collapsibles in Heritage data to display the title inside the bibl element:

https://github.com/majlis-erc/manuForma/blob/1be36d6d5ad93282058ad4033715a3be9ac88694/forms/templates/full-mss-template.xml#L214

This works not as we expected:

Screenshot 2024-01-25 at 09-37-37 Edit MS TEI Records

Screenshot 2024-01-25 at 09-32-49 Edit MS TEI Records

Example:

https://github.com/majlis-erc/majlis-data/blob/4b30ecb10e55050974bf72a025f67ea3a76675f9/data/manuscripts/tei/1.xml#L292-L296

We import other bibl elements whose title elements from our temporary database are displayed without giving us any trouble: Screenshot 2024-01-25 at 09-43-13 Edit MS TEI Records

wsalesky commented 8 months ago

@mMoliere This is a setting in the configuration file. Compare these two lines:

https://github.com/majlis-erc/manuForma/blob/main/forms/formGenerator/config-mss.xml#L539 Here the heading is hardcoded into the configuration file.

https://github.com/majlis-erc/manuForma/blob/main/forms/formGenerator/config-mss.xml#L568 Here the heading is created using an xpath.

I hope that helps.

mMoliere commented 7 months ago

@wsalesky I don't really get what you mean. Both are XPaths, the only difference that I can see is that the one not working has a child element.

wsalesky commented 7 months ago

@mMoliere You are right. I'm sorry, I think my local version of this file must be different. Sorry for the confusion. Try changing this line: https://github.com/majlis-erc/manuForma/blob/main/forms/formGenerator/config-mss.xml#L539

from: <group groupLabel="Quotation from and information about the heritage material." groupLabelConditionalElement="./*:bibl/title" groupLabelXPath="./*:bibl/title" groupNo="1" repeatable="yes">

to: <group groupLabel="Quotation from and information about the heritage material." groupLabelConditionalElement="./*:bibl/*:title" groupLabelXPath="./*:bibl/*:title" groupNo="1" repeatable="yes">

The issue appears to be the missing namespace on the title element. I have not tested this, so let me know if that does not solve the issue.