From: Jan Nieuwenhuizen Date: Sun, 29 Sep 2002 23:18:55 +0000 (+0000) Subject: Fixes. input/trip.ly now parses as xml (without X-Git-Tag: release/1.7.2~18 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f5d2537a9567468bd4b156ee7340f5c732df6cf7;p=lilypond.git Fixes. input/trip.ly now parses as xml (without dtd). Add preliminary dtd. --- diff --git a/ChangeLog b/ChangeLog index cd6bc5b257..b2ea4d1d97 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ 2002-09-30 Jan Nieuwenhuizen * scm/to-xml.scm: Fixes. input/trip.ly now parses as xml (without - dtd). + dtd). Add preliminary dtd. 2002-09-29 Han-Wen Nienhuys diff --git a/scm/to-xml.scm b/scm/to-xml.scm index a733078a24..47e8a6cf9b 100644 --- a/scm/to-xml.scm +++ b/scm/to-xml.scm @@ -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 + " + -# 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 " @@ -43,18 +70,6 @@ -(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))