Ver. 4.1.1: may generate unparseable MXML

• Aug 3, 2023 - 11:47

Exporting a score with figured bass contents to MXML, a file is generate which cannot be be read back.

The error message says:
"[file_path_and_name] is not a valid MusicXML file",
with the detail:
"Fatal error: line XXXX, column XX: Element figured-bass is missing child element."

In fact a single exported file may contain several of these cases.

This may point to the presence of spurious figured bass element in the score in the first place.


Comments

I think I found the issue. Looking at the attached score, at line 15213 a <FiguredBass> tag begins which only contains a non-standard figured bass item (on purpose, as the corresponding notation is not supported yet).

In the exported .musicxml file, this generates an empty <figured-bass> tag at line 19013.

I believe the correct MXML export behaviour would be to drop the entire figured bass element altogether if it does not contains any <FiguredBassItem> element.

The Music XML documentation (https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/figur…) states that a figured bass element contains a <figure> (One or more times) excluding an empty element.

Attachment Size
Score_1.mscx 646.41 KB
Score_1.musicxml 722.13 KB

Do you still have an unanswered question? Please log in first to post your question.