XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
RE: [xml-dev] MusicXML 2.0 XSD released

> One improvement you might like to do is to make all elements 
> and complex types global ("garden of eden" style) - this 
> exposes the types to schema-aware xslt and xquery, and 
> arguably helps the maintenance of the schema.

By and large, the schema tends to follow the rule that if an element
declaration is local, its type is global, and that's probably sufficient for
schema-aware XSLT and XQuery processing: it means you can either use
schema-element(E) or element(E, T) in a function signature.

There are two important exceptions, unfortunately right at the "top level":

Within score-partwise, and similarly within score-timewise, both "part" and
"measure" are defined as local element declarations with anonymous types. 

Since one of these has measure within part, and the other has part within
measure (because one model is a hierarchic inversion of the other), "part"
and "measure" do need to be local elements. However, there would be
advantages in making the types global. Also, the content model of
"part-within-measure" in one case is the same as the content model of
"measure-within-part" in the other case (the types differ in their
attributes but not in their element structure). If you want to write
reusable QT code that can operate on either model, there would be an
advantage in giving the two types some kind of relationship in the type
hierarchy - probably both being extensions of an abstract complex type
part-measure (the extension being to add the attributes).

Incidentally, I can confirm that Saxon-SA handles this schema with no
problems.

It would be interesting to try and write some XSD 1.1 assertions for this
schema, for example describing the relationship between the length of a note
and the number of beams (a quaver cannot have more than one beam, etc), on
the length of bars in relation to the time signature, etc. 

Michael Kay



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS