         :csv  (components->csv   component-list)
         :edn  (data->edn         component-list)))
 
+(defn components-to-chapter-mapping-output-data
+    "Export component to chapter mapping into selected output format."
+    [output-format component-list]
+    (case output-format
+        :json (data->json        component-list)
+        :txt  (components-to-chapter->text  component-list)
+        :xml  (components-to-chapter->xml   component-list)
+        :csv  (components-to-chapter->csv   component-list)
+        :edn  (data->edn         component-list)))
+

                                   :id     (:id component)
                                   :name   (:name component)}})})))

(defn products->csv
    "Convert list of products into CSV file."
    [products]

    [components]
    (->> (for [component components]
            (str (:id component) "\t" (:name component)))
            (clojure.string/join "\n")))

(defn components-to-chapter->text
    "Convert list of components into plain text file. Fields are separated by TAB characters."
    [components]
    (->> (for [component components]
            (str (:component component) "\t" (:chapter component)))
            (clojure.string/join "\n")))

(defn products->xml
