[MusicXML export] add text attribute to measure containing displayed measure number
Currently for scores containing section breaks (which reset displayed measure numbers), MuseScore's MusicXML export resets the measure's number attribute at the section break. As measure numbers are supposed to be unique within a part, this is strictly speaking incorrect. Up to and including MusicXML 3.0 no better solution was available to export measure numbers for multiple movements and our competition also does this. See #292461: [Musicxml Export] - Measure numbering not correct.
As of MusicXML 3.1, a proper solution is available: the measure's number attribute is a part-wide unique identification number (which does not reset at a section break), while the displayed measure number (which may reset at a section break) is in the text attribute.
Quoting the MusicMXL 3.1 schema (score.mod):
If measure numbers are not unique within a part, this can cause problems for conversions between partwise and timewise formats. The text attribute allows specification of displayed measure numbers that are different than what is used in the number attribute.
Example file with MusicXML export as is and to be is attached.