getLinkTarget.xql fails if window title not found for mei:work
https://github.com/Edirom/Edirom-Online/blob/914ccfd7dc9f3f10cbbf9ab9640980e764dc2f04/add/data/xql/getLinkTarget.xql#L170
e.g. in MEI 4.0.1 work does no longer contain titleStmt
https://github.com/Edirom/Edirom-Online/blob/914ccfd7dc9f3f10cbbf9ab9640980e764dc2f04/add/data/xql/getLinkTarget.xql#L172
fails for MEI 4 upward because mei:workDesc was replaced with mei:workList
Is the function failing by throwing an error or is it returning "unknown" where you would expect some title text?
I have tested this with an MEI 5 file. I hade to delete a lot of titles before nothing was returned, but I was not able to force a fail. At the end an emptry string was retuned.
Since @bwbohl mentioned #118 here: Special characters and hard linebreaks have been a problem since I can remember. The linebreak issue was simply fixed by normalizing the space. But also with a title containing the apostrophe I am not able to reproduce this case. @bwbohl Could you provide me a title-Container that I can copy&paste into my test set?
The current implelemtation
https://github.com/Edirom/Edirom-Online/blob/d3f4ce45220f9d30c42d632eec43b7c9fc5a461b/add/data/xql/getLinkTarget.xql#L150-L189
As we can see from the above, normalize-space() is only called for source objects
We should apply it to all object types
The normalisation already happens in eutil:getLocalizedTitle()
hmm… please test #103 it fails in my local instance
Regrettably 8accbac0d0fa96c4fcfc99726e5ff45be21c304b wasn't enough to fix the mei4+ issues. The structure turned from
<workDesc>
<work>
<titleStmt>
<title></title>
</titleStmt>
</work>
</workDesc>
to
<workList>
<work>
<title></title>
</work>
<workList>
i.e., the titleStmt is missing in the new structure. Yet, add/data/xql/getLinkTarget.xql still looks for titleStmt.
I'll have an eye on that!