X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fto-xml.scm;h=f1d2e76d2e080ff53fa47d93acc34a0c1f1d7f24;hb=0e13fe23a0698ae81b9e618b15841b8a88919ed7;hp=409247d0a554963bb2c52cdd379a22bd12739f43;hpb=e42585017a01fd02f6353b994cf0c87b03a7bb2e;p=lilypond.git diff --git a/scm/to-xml.scm b/scm/to-xml.scm index 409247d0a5..f1d2e76d2e 100644 --- a/scm/to-xml.scm +++ b/scm/to-xml.scm @@ -1,9 +1,20 @@ -;;;; to-xml.scm -- dump parse tree as xml +;;;; This file is part of LilyPond, the GNU music typesetter. ;;;; -;;;; source file of the GNU LilyPond music typesetter -;;;; -;;;; (c) 2003--2006 Han-Wen Nienhuys +;;;; Copyright (C) 2003--2011 Han-Wen Nienhuys ;;;; Jan Nieuwenhuizen +;;;; +;;;; LilyPond is free software: you can redistribute it and/or modify +;;;; it under the terms of the GNU General Public License as published by +;;;; the Free Software Foundation, either version 3 of the License, or +;;;; (at your option) any later version. +;;;; +;;;; LilyPond is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;;; GNU General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU General Public License +;;;; along with LilyPond. If not, see . (define-module (scm to-xml)) @@ -89,19 +100,6 @@ is then separated. (numer . ,(car (ly:duration-factor d))) (denom . ,(cdr (ly:duration-factor d)))))) -(define (musicxml-pitch->xml-node p) - (make - #:name 'pitch - #:children - (list - (make - #:name 'step - #:value (list-ref '("C" "D" "E" "F" "G" "A" "B") - (ly:pitch-notename p))) - (make - #:name 'octave - #:value (number->string (ly:pitch-octave p)))))) - (define (pitch->xml-node p) (make #:name 'pitch @@ -233,9 +231,9 @@ is then separated. (string-append "string name) ">")) (define-public (music-to-xml music port) - "Dump XML-ish stuff to PORT." + "Dump XML-ish stuff to @var{port}." - ;; dtd contains # -- This confuses tex during make web. + ;; dtd contains # -- This confuses tex during make doc. ;; ;; (display (dtd-header) port) @@ -244,13 +242,12 @@ is then separated. (display (close-tag 'music) port)) (define-public (music-to-musicxml music port) - "Dump MusicXML-ish stuff to PORT." + "Dump MusicXML-ish stuff to @var{port}." - ;; dtd contains # -- This confuses tex during make web. + ;; dtd contains # -- This confuses tex during make doc. ;; ;; (display (dtd-header) port) - (define pitch->xml-node musicxml-pitch->xml-node) (define duration->xml-node musicxml-duration->xml-node) (display (open-tag 'music '((type . score)) '()) port)