Converting MIME types
(mime-cast to-type'from-type) =>converter
- to-type
- String; MIME type returned from converter
- converter
- String; MIME type of converter input
- converter
- function to convert from from-type to to-type
The converter function should check whether the input is given as XML structure or plain string / bytevector data. The latter shall be treated as serialised form (as read from files).
Registering [[MIME]] converters
New MIME converters need to be registered with the converter selection system.
(register-mime-converter! to-type'from-type'converter)
Examples
implementation howto (german DTAUS)
The Converter Table
| from | to | function |
| text/xml | text/xml (and several XML based types) | xml-parse |
| text/xml (and several XML based types) | text/plain | xml-format |
| text/xml | text/html | html-parse-permissive (up to html-prag) |
| multipart/mixed | text/xml | mime-format-multipart-output-element |
| text/xml | zip-content (several zip based formats like ODF) | zip-unpack-str |
| zip-content (several zip based formats) | text/xml | zip-pack |
| image/png | image/svg+xml | svg->png |
| text/wikipedia | text/xml | parse wiki syntax (slightly missnamed, derived from, but not exactly wikipedia syntax) |
| text/wikipedia | text/xml | serialise (some) html markup in the wikipedia-derived syntax |