MakeMusic
SmartMusic Finale Garritan MusicXML

Applying XSL to 3.0 xml produces 2.0 xml

Moderator: Michael Good

Applying XSL to 3.0 xml produces 2.0 xml

Postby zimrahdev » Thu May 14, 2015 5:31 am

I am starting to integrate the reading of MusicXml 3.0 into my application.
I need to transform the file from partwise to timewise.
I have downloaded the files from the site and apply the transformation with parttime.xsl.

However, this is producing a MusicXML 2.0 file.
In the xsl there is this statement :

<xsl:output method="xml" indent="yes" encoding="UTF-8"
omit-xml-declaration="no" standalone="no"
doctype-system="http://www.musicxml.org/dtds/timewise.dtd"
doctype-public="-//Recordare//DTD MusicXML 2.0 Timewise//EN" />

This is even on the documentation page.

When I compare the v2.0 xsl with the v3.0 xsl, the only difference is in the comment header.
Can this xsl be used safely, without the loss of any elements (nodes, attributes, etc) ?
If this is the case, the DTD type should be updated, should it not ?
zimrahdev
 
Posts: 19
Joined: March, 2014
Reputation: 0

Re: Applying XSL to 3.0 xml produces 2.0 xml

Postby Michael Good » Thu May 14, 2015 11:11 am

Sorry about that! Thank you for reporting this. The same error is in both parttime.xsl and timepart.xsl. You can see how often people use the timewise format, given that this error has been undetected for 4 years.

I recommend that you edit your local version of the xsl file to change that 2.0 to 3.0. We will work to do the same here, doing an in-place edit to fix these bugs. Some software may get confused if you use MusicXML 3.0 elements while reporting a MusicXML 2.0 file in the doctype.
Michael Good
VP of MusicXML Technologies
MakeMusic, Inc.
User avatar
Michael Good
 
Posts: 2197
Joined: March, 2014
Reputation: 0

Re: Applying XSL to 3.0 xml produces 2.0 xml

Postby zimrahdev » Fri May 15, 2015 1:18 am

Thank you Michael,
I'll update the DTD statement.
Can you confirm, though, that the XSL will indeed produce correct 3.0 xml, ie: there is no risk of anything being lost ?
zimrahdev
 
Posts: 19
Joined: March, 2014
Reputation: 0

Re: Applying XSL to 3.0 xml produces 2.0 xml

Postby Michael Good » Fri May 29, 2015 12:00 pm

If you make that fix it should work fine, with no additional limitations beyond what has been present since MusicXML 1.0. The main limitation I know of is that multimetric music with different barlines per part - using the non-controlling attribute of the measure element - will not transform correctly with these stylesheets.
Michael Good
VP of MusicXML Technologies
MakeMusic, Inc.
User avatar
Michael Good
 
Posts: 2197
Joined: March, 2014
Reputation: 0

Re: Applying XSL to 3.0 xml produces 2.0 xml

Postby Michael Good » Tue Jun 02, 2015 4:37 pm

The parttime.xsl and timepart.xsl styleshseets have now been fixed to output the MusicXML 3.0 public ID rather than the MusicXML 2.0 public ID. This was done as an in-place edit on the web site. The version history has been updated.
Michael Good
VP of MusicXML Technologies
MakeMusic, Inc.
User avatar
Michael Good
 
Posts: 2197
Joined: March, 2014
Reputation: 0

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron