MusicXML fault in 2.0.3

• Jun 2, 2016 - 15:16

'number="0"' is invalid in direction-type wedge:

<direction placement="below">
<direction-type>
<wedge type="crescendo" number="0"/>
</direction-type>
<staff>1</staff>
</direction>

I suggest you write the MusicXML using a validating serialiser, or you test using a validating parser.
You can also use SeeScore to test as that uses a validating parser


Comments

Thank for you suggestion. MuseScore already use a validator on import, but there is no reason to make one on export except for testing: what we would do if the file isn't valid?
Do you have the mscz file?

In reply to by [DELETED] 5

Hi Lasconic,

Thank you for the prompt reply.

>Thank for you suggestion. MuseScore already use a validator on import, but
>there is no reason to make one on export except for testing: what we would do
>if the file isn't valid?

You would fail to write the file, and produce an error report identifying the exact problem, which in my world is better than writing a bad file. Perhaps that is a contentious view but it would certainly save me a lot of time trying to debug this sort of error!

SeeScore uses a validating parser so this file is completely useless. Also MuseScore has a problem reading it I think - certainly if it uses a validating parser.

I have asked the person who sent me the xml file to send the mscx. I'll let you have it ASAP.

best regards
James Sutton

In reply to by jsutton

Opening the 1st file, export as XML and import again gives:
Fatal error: line 29541 column 46 Content of attribute number does not match its type definition: 0 is not valid according to xs:positiveInteger..
(yes, with 2 dots at the end!) and this is indeed the line "<wedge type="crescendo" number="0"/>"

Sames step for the 2nd files gives:
Fatal error: line 56145 column 27 Element time-modification is not defined in this scope.
Seems it doesn't like it twice in a row?

Same steps for the 3rd file gives:
Fatal error: line 68478 column 46 Content of attribute number does not match its type definition: 0 is not valid according to xs:positiveInteger..
Same issue as with the 1st file

Of course, MuseScore should not produce invalid MusicXML, but this does not happen too often. I am not convinced migrating to a validating parser would bring enough benefits to justify the effort. With the exception of libmusicxml (which I do not know well), I am not aware of any available open source solution.

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