Skip to content

Instantly share code, notes, and snippets.

@JekoTronik
Last active April 9, 2020 14:52
Show Gist options
  • Save JekoTronik/9cc9bdd3db293f87ff182765d89a6abe to your computer and use it in GitHub Desktop.
Save JekoTronik/9cc9bdd3db293f87ff182765d89a6abe to your computer and use it in GitHub Desktop.
(use-modules (sxml simple)
(sxml match)
(ice-9 exceptions))
(define (ciqual-table->sxml xml-file)
(with-exception-handler
(lambda (exn)
(apply (lambda (key . value)
(format #t "'not-existing-file':Aucun fichier ou dossier de ce type"))
(exception-kind exn) (exception-args exn)))
(lambda _
(call-with-input-file xml-file
(lambda (xml-port)
(xml->sxml xml-port #:trim-whitespace? #t))))
#:unwind? #t
#:unwind-for-type 'system-error))
(define (ciqual-table->sxml no-existing-file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment