Bad xml export by Dorico

The export won’t load in Sibelius due to a “Element duration is not defined in this scope” error.

Dorico also throws an error when trying to load its own xml export

"ERROR - Element ‘duration’: This element is not expected. Expected is one of ( grace, cue, chord, pitch, unpitched, rest ).
At line 94268 of file:f.xml
ERROR - Element ‘duration’: This element is not expected. Expected is one of ( grace, cue, chord, pitch, unpitched, rest ).
At line 94276 of file:f.xml
ERROR - Element ‘duration’: This element is not expected. Expected is one of ( grace, cue, chord, pitch, unpitched, rest ).
At line 94285 of file:f.xml
ERROR - Element ‘duration’: This element is not expected. Expected is one of ( grace, cue, chord, pitch, unpitched, rest ).
At line 94294 of file:f.xml
ERROR - Element ‘duration’: This element is not expected. Expected is one of ( grace, cue, chord, pitch, unpitched, rest ).
At line 94302 of file:f.xml
ERROR - Element ‘duration’: This element is not expected. Expected is one of ( grace, cue, chord, pitch, unpitched, rest ).
At line 94311 of file:f.xml
"
(note, I edited the file name in the Dorico error message as it was long and gumming up the post)

Is this known, or should I upload the files?

–Neil

It would certainly be helpful to have the Dorico project that produces this malformed MusicXML, ideally chopped down to the minimal bit required to reproduce it. If you look at that region in the XML file, you should be able to work out which part (i.e. staff) and bar the problem occurs in, and then perhaps you could try cutting down the project to just that staff and perhaps just that bar (depending on what the nature of the problem is), and if that successfully reproduces it, upload it here.

If that’s not practical, then I’ll need both the Dorico project and the exported MusicXML file so I can do the detective work myself.

Hacked it down to a few bars
xml debug - Full score - 01 Anonymous.xml (124.7 KB)
xml debug.dorico (528.6 KB)

Thanks, Neil: this is an issue we know about and which we will fix in due course. The invalid MusicXML is caused by Dorico incorrectly handling unpitched percussion notes that are hidden behind a slash region; they end up exported without the crucial <unpitched> element. We will address this when we address the export of slashes and repeat bars more generally, which are not currently exported in MusicXML in any case.