<!--
	MusicXML barline.dtd

	Version 1.0 - 13 January 2004
	
	Copyright © 2004 Recordare LLC.
	http://www.recordare.com/
	
	This MusicXML work is being provided by the copyright
	holder under the MusicXML Document Type Definition 
	Public License Version 1.02, available from:
	
		http://www.recordare.com/dtds/license.html
-->

<!--
	If a barline is other than a normal single barline, it
	should be represented by a barline element that describes
	it. This includes information about repeats and multiple
	endings, as well as line style. Barline data is on the
	same level as the other musical data in a score - a child
	of a measure in a partwise score, or a part in a timewise
	score. This allows for barlines within measures, as in
	dotted barlines that subdivide measures in complex
	meters. The two fermata elements allow for fermatas
	on both sides of the barline (the lower one inverted).
	
	Barlines have a location attribute to make it easier to
	process barlines independently of the other musical data
	in a score. It is often easier to set up measures
	separately from entering notes. The location attribute
	must match where the barline element occurs within the
	rest of the musical data in the score. If location is
	left, it should be the first element in the measure; if
	location is right, it should be the last element. If no
	location is specified, the right barline is the default.
-->

<!-- Elements -->

<!ELEMENT barline (bar-style?, %editorial;, wavy-line?, 
	segno?, coda?, (fermata, fermata?)?, ending?, repeat?)>
<!ATTLIST barline
    location (right | left | middle) "right"
>

<!--
	Bar-style contains style information. Choices are
	regular, dotted, heavy, light-light, light-heavy,
	heavy-light, heavy-heavy, and none.
-->
<!ELEMENT bar-style (#PCDATA)>

<!--
	The voice entity and the wavy-line, segno, and fermata
	elements are defined in the common.dtd file. They can
	apply to both notes and barlines.
-->

<!--
	Endings refers to multiple (e.g. first and second)
	endings. Typically, the start type is associated with
	the left barline of the first measure in an ending. The
	stop and discontinue types are associated with the right
	barline of the last measure in an ending. Stop is used
	when the ending mark concludes with a downward jog, as
	is the case for first endings. Discontinue is used when
	there is no downward jog, as in the final ending. The
	number attribute reflects what is under the ending
	line. Single endings such as "1" or multiple endings
	such as "1, 2" may be used.
-->
<!ELEMENT ending EMPTY>
<!ATTLIST ending
    number CDATA #REQUIRED
    type (start | stop | discontinue) #REQUIRED
>

<!--
	Repeat marks. The start of the repeat has a forward
	direction while the end of the repeat has a backward
	direction. Backward repeats that are not part of an
	ending can use the times attribute to indicate the
	number of times the repeated section is played.
-->
<!ELEMENT repeat EMPTY>
<!ATTLIST repeat
    direction (backward | forward) #REQUIRED
    times CDATA #IMPLIED
>

<SCRIPT language="Javascript">
<!--

// FILE ARCHIVED ON 20041026040406 AND RETRIEVED FROM THE
// INTERNET ARCHIVE ON 20070826202102.
// JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
// ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
// SECTION 108(a)(3)).

   var sWayBackCGI = "http://web.archive.org/web/20041026040406/";

   function xResolveUrl(url) {
      var image = new Image();
      image.src = url;
      return image.src;
   }
   function xLateUrl(aCollection, sProp) {
      var i = 0;
      for(i = 0; i < aCollection.length; i++) {
         if (typeof(aCollection[i][sProp]) == "string") { 
          if (aCollection[i][sProp].indexOf("mailto:") == -1 &&
             aCollection[i][sProp].indexOf("javascript:") == -1) {
            if(aCollection[i][sProp].indexOf("http") == 0) {
                aCollection[i][sProp] = sWayBackCGI + aCollection[i][sProp];
            } else {
                aCollection[i][sProp] = sWayBackCGI + xResolveUrl(aCollection[i][sProp]);
            }
         }
         }
      }
   }

   xLateUrl(document.getElementsByTagName("IMG"),"src");
   xLateUrl(document.getElementsByTagName("A"),"href");
   xLateUrl(document.getElementsByTagName("AREA"),"href");
   xLateUrl(document.getElementsByTagName("OBJECT"),"codebase");
   xLateUrl(document.getElementsByTagName("OBJECT"),"data");
   xLateUrl(document.getElementsByTagName("APPLET"),"codebase");
   xLateUrl(document.getElementsByTagName("APPLET"),"archive");
   xLateUrl(document.getElementsByTagName("EMBED"),"src");
   xLateUrl(document.getElementsByTagName("BODY"),"background");
   var forms = document.getElementsByTagName("FORM");
   if (forms) {
       var j = 0;
       for (j = 0; j < forms.length; j++) {
              f = forms[j];
              if (typeof(f.action)  == "string") {
                 if(typeof(f.method)  == "string") {
                     if(typeof(f.method) != "post") {
                        f.action = sWayBackCGI + f.action;
                     }
                  }
              }
        }
    }


//-->
</SCRIPT>

