I tried an experiment of exporting a dorico project to xml and importing back again into a new project created from scratch. MusicXML validation failed with:
ERROR - Element ‘direction-type’: Missing child element(s). Expected is one of ( rehearsal, segno, coda, dynamics, percussion, wedge, dashes, bracket, pedal, metronome ).
At line 354 of file:/C:/Users/pmc/Documents/Dorico%20Projects/MenuetsEnRondeau4%20-%20Full%20score%20-%2001%20Flow%201.musicxml
and in the musicxml file there is
***
segno
1
where I have added *** to line 354, And indeed, at measure 3, I have attached a Segno Repeat Marker. So an unnecessary and unexpected empty direction-type lxml element was created nefore what looks like a prefectly good one.
The project is very big. I you really needed one, I would cut it up for you, buy maybe you can analyze the problem from the above info?
Once I remove the 2 offending lines, the import proceeds without anu further ado !
Sorry, the included text was not shown, the first part was
Element ‘direction-type’: Missing child element(s), Expected is one of (rehearsal, segno, coda, dynamics, percussion, wedge, dashes, bracket, pedal, metronome).
at line 354 of file.…
The second part was:
direction directive=“yes” system=“only-top”>
direction-type>
/direction-type> ***
direction-type>
symbol font-style=“normal” font-weight=“bold”>segno
/direction-type>
/direction>
I have removed all opening "<"s, which were interperd. I hope this time, it shows!
Could you attach the project you are trying to export?
It is a big project, but if you need it, I will provide a short form (after all the problem occurs after the 3d bar !). That should not be too long, but I’ll have to check I don’t scare the error away.
I have attached a small project to my post, testsegnoxml.dorico. Any exported layout should exhibit the problem.
It doesn’t seem to have attached unfortunately. You can send it to me by PM or email me at r dot lanyon at steinberg dot de
Very sorry about the miss!
(attachments)
testsegnoxml.dorico (617 KB)
I have sent it by email. I should mwyba have mentionned also that after I removed the invalid emty elemnt, butleaved the correct direction-type element with “segno” inside, the import worked but the segno was not created in the project. The error message said
Expected is one of (rehearsal, segno, coda, dynamics, percussion, wedge, dashes, bracket, pedal, metronome).
but the child element is a symbol, none of those (not segno, in particular). Might it be why it was not treated?
Clearly Dorico expects a segno to be related to a referencing repeat ending. If the counterparty doesn’t exist it objects.
It looks like the problem is that we’re not exporting the Segno quite correctly. I’ll make a note of that and investigate further when I’m at work tomorrow, thanks.
I suspect the problem is on the import side, not the export. (It imports without error to MuseScore - and they add the missing DS al fine)
Well, the MusicXML we’re exporting is “wrong” in the strict sense of not conforming to the MusicXML DTD. There is some information about the segno there but it’s not quite laid out as it should be. Probably MuseScore isn’t doing validation - that is, generic XML validation, rather than anything MusicXML specific - on import though.
You guys are the experts!
Oh! The full project had repeat endings, and ended with a D.C. al S, that is whi I had put a segmo! But when I shortened the project, I cut it. Do you want me to reproduce a better project with the D.C. al S present? But the actual problem is not so much the unexpected segno element format that is just ignored, but the previous childless direction element that is a fatal error.
I’ve had a further look. I think what’s happening here is that Dorico is getting slightly confused by the music’s repeat structure, and that’s causing it to omit some of the information about the segno from the MusicXML. A side-effect of this is that the MusicXML has an empty element for something that isn’t meant to be empty - this won’t have any bad effects, but it’s what’s causing the error.
I’ve logged this for a developer to take a look at in due course.
I guess this was fixed in 5.60
MusicXML export Under rare circumstances, Dorico could export invalid MusicXML for segno repeat markers;
this has now been fixed.
Well done!