<!ELEMENT XMusic (document_text?, system)> <!ATTLIST XMusic VERSION CDATA #REQUIRED> <!-- Text elements can have different levels: - document (applies to the whole doc) - title - composer - copyright - system (applies to all staves in system) - rehearsal letters - tempo text - other text - staff (applies to all voices in one staff) - voice (applies only to one voice) --> <!ELEMENT document_text (title?, composer?, copyright?, dt_other*)?> <!ELEMENT title (#PCDATA)> <!ELEMENT composer (#PCDATA)> <!ELEMENT copyright (#PCDATA)> <!ELEMENT dt_other (#PCDATA)> <!ELEMENT system (tempo | location | timesig | repeat | instrument | quant | qspec1 | qspec2 | qspec3 | qspec4 | system_text | staff)*> <!-- time elements (tempo, timesig, location, rehearsal letters, bar numbers, etc.) must be for a whole system --> <!ELEMENT tempo EMPTY> <!ATTLIST tempo id ID #REQUIRED> <!ATTLIST tempo loc IDREF #REQUIRED> <!ATTLIST tempo bpm CDATA #REQUIRED> <!ELEMENT location EMPTY> <!ATTLIST location id ID #REQUIRED> <!ATTLIST location bar CDATA #REQUIRED> <!ATTLIST location beat CDATA #REQUIRED> <!ATTLIST location part CDATA #REQUIRED> <!ELEMENT timesig EMPTY> <!ATTLIST timesig id ID #REQUIRED> <!ATTLIST timesig loc IDREF #REQUIRED> <!ATTLIST timesig top CDATA #REQUIRED> <!ATTLIST timesig bot CDATA #REQUIRED> <!ATTLIST timesig sym CDATA #IMPLIED> <!ELEMENT repeat EMPTY> <!-- type = forward, backward, DC, DS, etc. coordin allows a repeat to refer to another repeat to show that they work together which is not always obvious --> <!ATTLIST repeat id ID #REQUIRED> <!ATTLIST repeat loc IDREF #REQUIRED> <!ATTLIST repeat type CDATA #REQUIRED> <!ATTLIST repeat coordin IDREF #IMPLIED> <!-- the concept of an instrument is somewhat problematic. In general, an instrument is associated with a voice, but multiple voices can be associated with an instrument. I have solved this by making instrument a global and having voices point to instruments --> <!ELEMENT instrument EMPTY> <!ATTLIST instrument id ID #REQUIRED> <!ATTLIST instrument name CDATA #REQUIRED> <!-- Quantilization is treated as a global with various "qspecs" which can point to a global quant --> <!ELEMENT quant EMPTY> <!ATTLIST quant id ID #REQUIRED> <!ATTLIST quant perc CDATA "50"> <!-- qspec1 identifies a quant to be applied to a range of locations within one voice --> <!ELEMENT qspec1 EMPTY> <!ATTLIST qspec1 quant IDREF #REQUIRED> <!ATTLIST qspec1 loc1 IDREF #REQUIRED> <!ATTLIST qspec1 loc2 IDREF #REQUIRED> <!ATTLIST qspec1 voice IDREF #REQUIRED> <!-- qspec2 identifies a quant to be applied to a range of locations within a range of voices --> <!ELEMENT qspec2 EMPTY> <!ATTLIST qspec2 quant IDREF #REQUIRED> <!ATTLIST qspec2 loc1 IDREF #REQUIRED> <!ATTLIST qspec2 loc2 IDREF #REQUIRED> <!ATTLIST qspec2 voice1 IDREF #REQUIRED> <!ATTLIST qspec2 voice2 IDREF #REQUIRED> <!-- qspec3 identifies a quant to be applied to a range of locations within one staff --> <!ELEMENT qspec3 EMPTY> <!ATTLIST qspec3 quant IDREF #REQUIRED> <!ATTLIST qspec3 loc1 IDREF #REQUIRED> <!ATTLIST qspec3 loc2 IDREF #REQUIRED> <!ATTLIST qspec3 staff IDREF #REQUIRED> <!-- qspec4 identifies a quant to be applied to a range of locations within a range of staves --> <!ELEMENT qspec4 EMPTY> <!ATTLIST qspec4 quant IDREF #REQUIRED> <!ATTLIST qspec4 loc1 IDREF #REQUIRED> <!ATTLIST qspec4 loc2 IDREF #REQUIRED> <!ATTLIST qspec4 staff1 IDREF #REQUIRED> <!ATTLIST qspec4 staff2 IDREF #REQUIRED> <!ELEMENT system_text (rehearsal_letter | tempo_text | st_other)> <!ELEMENT rehearsal_letter (#PCDATA)> <!ATTLIST rehearsal_letter loc IDREF #REQUIRED> <!ELEMENT tempo_text (#PCDATA)> <!ATTLIST tempo_text loc IDREF #REQUIRED> <!ELEMENT st_other (#PCDATA)> <!ATTLIST st_other loc IDREF #REQUIRED> <!ELEMENT staff (staff_text | clef | keysig | voice | chord | dynamic | dyn_range | transposition | expression)*> <!ATTLIST staff id ID #REQUIRED> <!ELEMENT staff_text (#PCDATA)> <!ATTLIST staff_text staff IDREF #REQUIRED> <!ATTLIST staff_text loc IDREF #REQUIRED> <!ELEMENT clef EMPTY> <!ATTLIST clef loc IDREF #REQUIRED> <!ATTLIST clef type CDATA #REQUIRED> <!ELEMENT keysig EMPTY> <!ATTLIST keysig loc IDREF #REQUIRED> <!ATTLIST keysig sf CDATA #IMPLIED> <!ATTLIST keysig num CDATA #REQUIRED> <!ATTLIST keysig name CDATA #IMPLIED> <!ELEMENT voice (voice_text | note | beam | slur | tie)*> <!ATTLIST voice id ID #REQUIRED> <!ELEMENT voice_text (#PCDATA)> <!ATTLIST voice_text voice IDREF #REQUIRED> <!ATTLIST voice_text loc IDREF #REQUIRED> <!ELEMENT note EMPTY> <!ATTLIST note id ID #REQUIRED> <!ATTLIST note loc IDREF #REQUIRED> <!ATTLIST note pitch CDATA #REQUIRED> <!ATTLIST note type CDATA #REQUIRED> <!ATTLIST note name CDATA #IMPLIED> <!ATTLIST note accidental CDATA #IMPLIED> <!ATTLIST note enharmonic CDATA #IMPLIED> <!ELEMENT accidental EMPTY> <!ELEMENT enharmonic EMPTY> <!ELEMENT beam EMPTY> <!ATTLIST beam note1 IDREF #REQUIRED> <!ATTLIST beam note2 IDREF #REQUIRED> <!ELEMENT slur EMPTY> <!ATTLIST slur note1 IDREF #REQUIRED> <!ATTLIST slur note2 IDREF #REQUIRED> <!ELEMENT tie EMPTY> <!ATTLIST tie note1 IDREF #REQUIRED> <!ATTLIST tie note2 IDREF #REQUIRED> <!ELEMENT chord EMPTY> <!ATTLIST chord symbol CDATA #REQUIRED> <!ELEMENT dynamic EMPTY> <!ATTLIST dynamic location ID #REQUIRED> <!ATTLIST dynamic dynid CDATA #REQUIRED> <!ELEMENT dyn_range EMPTY> <!ATTLIST dyn_range loc1 IDREF #REQUIRED> <!ATTLIST dyn_range loc2 IDREF #REQUIRED> <!ATTLIST dyn_range dynid CDATA #REQUIRED> <!ELEMENT transposition EMPTY> <!ELEMENT expression EMPTY> <!ATTLIST expression loc IDREF #REQUIRED>