TEIC/romajs

Bug when ODD is asked to delete an item no longer part of TEI

catsmith opened this issue · 1 comments

I am trying to modify a very old (2011) schema in the new version of ROMA - the old one is currently refusing to generate schema. I uploaded the ODD with no problems (once I remove the non-tei modifications that are not yet supported). However when I tried to save it I was given an error of 'Uncaught TypeError: Cannot read properties of undefined (reading 'module')'. I used the chrome debugger to discover this was because we were trying to delete a TEI element that is no longer part of the TEI specification. Specifically relationGrp in the namesdates module.

 <elementSpec module="namesdates" ident="relationGrp" mode="delete"/>

It would be nicer if this could be handled in such a way that it was removed quietly rather than breaking the system or at least give an error that specifies what line of the ODD is the problem. Without knowing how to use the chrome debugger I would not have been able to identify this as the issue.

I have attached a minimal ODD which produces the error in case it is helpful. I had to pretend it was txt to get it to upload.
minimal_example.txt

Thanks, @catsmith ! This would indeed be a good feature to have. Will work on it.