   Book](http://www.daisy.org/daisypedia/daisy-digital-talking-book)"
   (:require [clojure.java.io :as io]
             [clojure.data.xml :as xml]
+            [clojure.java.shell :as shell]
             [mdr2.data.xml :as xml-new]
             [clojure.walk :as w]
             [clojure.zip :as zip]

   (let [updated (with-open [r (io/reader manifest)]
                  (update-meta-data (xml/parse r :support-dtd false)
                                    production handle-manifest-node))]
    (with-open [w (io/writer manifest)]
      (xml-new/emit updated w :doctype manifest-doctype)))))

(defn update-master-smil!
  "Update the master smil file of `volume` for `production` in-place

  [xml production handler]
  (w/postwalk #(handler % production) xml))

(defn xml-format!
  "Format xml file `in` and store it in file `out`"
  [in out]
  (shell/sh "xmllint" "--format" "--nonet"
            "--output" (.getAbsolutePath out)
            (.getAbsolutePath in)))

(defn update-mainfest!
  "Update the manifest file of `volume` for `production` in-place with
  the meta data from `production`. If a `manifest` is given the
