avalonmediasystem / react-structural-metadata-editor

React Structural Metadata Editor component which allows a user to interact with structural metadata, adding, editing and deleting headers and timespans. Also presents a visual waveform representation of the work audio file, for help in navigating and identifying sections of the waveform.
https://react-structural-metadata-editor.netlify.app/
5 stars 2 forks source link

Dissallow empty Div creation in SME #176

Open Dananji opened 1 year ago

Dananji commented 1 year ago

Description

SME renders the structure from a nested list of Ranges under structures property in a IIIF manifest.

According to the Presentation 3.0 spec, a Range must have an items property with at least one item (https://iiif.io/api/presentation/3.0/#34-structural-properties).

To abide this when creating/changing structures in SME, we should disallow saving empty Div (heading) items.

Done Looks Like

Definition of Done

elynema commented 1 year ago

Potentially the Avalon endpoint for saving structure could return error message if there is invalid data, and that could be returned to both XML editor and SME. We do have an XSD that could be used for validation.