Replies: 4 comments 16 replies
-
I'm researching this and looking around but my understanding is that xml:space and xml:lang can go on any xml tag regardless of whether it's specified in the MusicXML docs or not. It's part of the xml spec (hence the namespace) and not MusicXML spec. What MusicXML can specify is what parsers should do if omitted (for instance, treating lang as it not en). My initial thought is the default without xml:space should be to preserve internal line breaks but trim spaces at beginning and end. I think that we specified that MusicXML is a 0x0a (line feed) not 0x0d (carriage return) or both encoding. But I will look at that in the morning. In any case an entity can always be replaced with its literal encoding in xml without changing the meaning (I think...lots of work with Bleach in Artusi made this my understanding) so we can't say that a literal (edited to add backticks) |
Beta Was this translation helpful? Give feedback.
-
This is one of the main reasons why MNX has decided to switch to JSON -- the behavior of strings is so much better defined in JSON than in XML. We're going to trade off that JSON is not designed to be human readable/writeable. I share your frustration, but just to know how much better MusicXML (even 0.6beta) was than the world that came before it. So there is still a lot more to gain with carrots than sticks -- letter people know that supporting MusicXML will be cheered rather than being chastised for small errors in making it. AFAIK this is the first discussion of what the standard for these elements should be since I've been following MusicXML (and I had to look up the XML spec to be sure as well) so we can set out documentation for what things should be and help others to support it better going forward. :-) (Particular thanks for documenting Finale's behavior, since this is something that will not change so importers will need to be aware of that -- Michael Good's adding of the "Software" tag (and unlike window.navigator -- never having people spoof it) is one of the unsung genius moves in music notation history -- if there's a mistake in someone's interpretation, everyone else can work around it (perhaps with a sigh, but they can). FWIW -- Music21 also does not respect xml:space="preserve" in deciding to work with whitespace. It may in the future, now that I know about it, but it wasn't something I was thinking about at the time. |
Beta Was this translation helpful? Give feedback.
-
Answers to many of these questions can be found in the XML spec for whitespace handling and end-of-line handling. The "default" value is application-specific while the "preserve" value signals that all the whitespace should be preserved. Line breaks get handled as if CR or CRLF were encoded as LF instead. These are XML standards that MusicXML inherits as an XML language. Elements like |
Beta Was this translation helpful? Give feedback.
-
What I was wrong about is that I thought that any XML tag could add |
Beta Was this translation helpful? Give feedback.
-
What whitespace rules do apply to
<part-name>
? Are newlines preserved? And what about directly inserting
?Contrary to
<display-text>
there is noxml:space
attribute, and I couldn't find the default value. Please advise.Beta Was this translation helpful? Give feedback.
All reactions