X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fto-xml.scm;h=112c5305651059781d6cbb2c6e53e829b2b317d0;hb=47db9a3883d726ca53e2133a3b2298f78dd6a32e;hp=02f918eda93826cb8748cd89830892fbe7d33732;hpb=44dd3acc534e7a534f846810b481c3f603eaa92e;p=lilypond.git diff --git a/scm/to-xml.scm b/scm/to-xml.scm index 02f918eda9..112c530565 100644 --- a/scm/to-xml.scm +++ b/scm/to-xml.scm @@ -1,6 +1,6 @@ ;;;; This file is part of LilyPond, the GNU music typesetter. ;;;; -;;;; Copyright (C) 2003--2012 Han-Wen Nienhuys +;;;; Copyright (C) 2003--2015 Han-Wen Nienhuys ;;;; Jan Nieuwenhuizen ;;;; ;;;; LilyPond is free software: you can redistribute it and/or modify @@ -26,7 +26,7 @@ " 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.) +the documentation is generated.) That is much cleaner: building the document, and dumping it to output is then separated. @@ -70,7 +70,7 @@ is then separated. (if (equal? (node-value node) "") (string-append (if xml-name "\n" "") - (apply string-append (map musicxml-node->string (node-children node)))) + (string-concatenate (map musicxml-node->string (node-children node)))) (node-value node)) (if xml-name (close-tag xml-name) "") (if xml-name "\n" "")))) @@ -80,8 +80,7 @@ is then separated. "\n" (open-tag (node-name node) (node-attributes node) '()) (if (equal? (node-value node) "") - (string-append - (apply string-append (map xml-node->string (node-children node)))) + (string-concatenate (map xml-node->string (node-children node))) (node-value node)) "\n" (close-tag (node-name node)))) @@ -224,7 +223,7 @@ is then separated. (string-append "<" (symbol->string tag) - (apply string-append (map dump-attr (filter candidate? attrs))) + (string-concatenate (map dump-attr (filter candidate? attrs))) ">")) (define (close-tag name) @@ -253,4 +252,3 @@ is then separated. (display (open-tag 'music '((type . score)) '()) port) (display (musicxml-node->string (music->xml-node music)) port) (display (close-tag 'music) port)) -