]> git.donarmstrong.com Git - lilypond.git/blobdiff - python/musicxml.py
Fix 1025 (properly, this time).
[lilypond.git] / python / musicxml.py
index 9a918ba6b3756bfd7a5c2dff77bae9fcb806d36d..0400cce2532de083414c0ebbb3a730cc75e32b75 100644 (file)
@@ -15,7 +15,7 @@ def error (str):
 
 def escape_ly_output_string (input_string):
     return_string = input_string
-    needs_quotes = not re.match (u"^[a-zA-ZäöüÜÄÖßñ]*$", return_string);
+    needs_quotes = not re.match (u"^[a-zA-ZäöüÜÄÖß,\.!:ñ]*$", return_string);
     if needs_quotes:
         return_string = "\"" + string.replace (return_string, "\"", "\\\"") + "\""
     return return_string
@@ -539,6 +539,8 @@ class Syllabic (Music_xml_node):
         return (text == "begin") or (text == "middle")
 class Elision (Music_xml_node):
     pass
+class Extend (Music_xml_node):
+    pass
 class Text (Music_xml_node):
     pass
 
@@ -826,7 +828,7 @@ class Part (Music_xml_node):
            if not (isinstance (n, Note) or isinstance (n, Attributes) or
                     isinstance (n, Direction) or isinstance (n, Partial) or
                     isinstance (n, Barline) or isinstance (n, Harmony) or
-                    isinstance (n, FiguredBass) ):
+                    isinstance (n, FiguredBass) or isinstance (n, Print)):
                continue
 
            if isinstance (n, Attributes) and not start_attr:
@@ -842,7 +844,7 @@ class Part (Music_xml_node):
                             voices[v].add_element (staff_attributes)
                 continue
 
-            if isinstance (n, Partial) or isinstance (n, Barline):
+            if isinstance (n, Partial) or isinstance (n, Barline) or isinstance (n, Print):
                 for v in voices.keys ():
                     voices[v].add_element (n)
                 continue
@@ -1145,6 +1147,9 @@ class BeatUnitDot (Music_xml_node):
 class PerMinute (Music_xml_node):
     pass
 
+class Print (Music_xml_node):
+    pass
+
 
 
 ## need this, not all classes are instantiated
@@ -1173,6 +1178,7 @@ class_dict = {
         'direction-type': DirType,
        'duration': Duration,
         'elision': Elision,
+        'extend': Extend,
         'frame': Frame,
         'frame-note': Frame_Note,
         'figured-bass': FiguredBass,
@@ -1194,6 +1200,7 @@ class_dict = {
         'pedal': Pedal,
         'per-minute': PerMinute,
        'pitch': Pitch,
+        'print': Print,
        'rest': Rest,
         'root': Root,
         'score-part': Score_part,