]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fixes. input/trip.ly now parses as xml (without
authorJan Nieuwenhuizen <janneke@gnu.org>
Sun, 29 Sep 2002 23:18:55 +0000 (23:18 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 29 Sep 2002 23:18:55 +0000 (23:18 +0000)
dtd).  Add preliminary dtd.

ChangeLog
scm/to-xml.scm

index cd6bc5b257561c5b2c39346d93fcfa6bfa666001..b2ea4d1d9748c9c2597e422e7a0957074a2f4658 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
 2002-09-30  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * scm/to-xml.scm: Fixes.  input/trip.ly now parses as xml (without
-       dtd).
+       dtd).  Add preliminary dtd.
 
 2002-09-29  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
index a733078a244fa7a4df62095ba85f9a6f10756b09..47e8a6cf9b27da14b309b7ddd3723d4da03732b2 100644 (file)
@@ -1,6 +1,33 @@
+(use-modules (ice-9 regex))
+"
+
+
+Todo: this is a quick hack; it makes more sense to define a GOOPS
+class of a documentnode (similar to how
+; the documentation is generated.)
+
+That is much cleaner: building the document, and dumping it to output
+is then separated.
+
+"
+
+
+(define (dtd-header)
+  (string-append
+   "<?xml version=\"1.0\"?>
+<!DOCTYPE MUSIC ["
+   preliminary-dtd
+   "
+]>
 
-# as computed from input/trip.ly, by
-# http://www.pault.com/pault/dtdgenerator/
+"))
+  
+;; as computed from input/trip.ly, by
+;; http://www.pault.com/pault/dtdgenerator/
+
+;; must recompute with larger, more serious piece, and probably
+;; manually add stuff
 (define preliminary-dtd
   "
 <!ELEMENT duration EMPTY >
 
 
 
-(use-modules (ice-9 regex))
-"
-
-
-Todo: this is a quick hack; it makes more sense to define a GOOPS
-class of a documentnode (similar to how
-; the documentation is generated.)
-
-That is much cleaner: building the document, and dumping it to output
-is then separated.
-
-"
 
 (define (dump-duration d port)
  (display (open-tag 'duration
@@ -159,6 +174,7 @@ is then separated.
    
 (define-public (music-to-xml music port)
   "Dump XML-ish stuff to PORT."
+  (display (dtd-header) port)
   (display (open-tag 'music '((type . score)) '()) port)
   (music-to-xml-helper music port)
   (display (close-tag 'music) port))