]> dreyeck.freedombox.rocks Git - topic-maps.git/blob - src/cxtm/package.lisp
Add string and URI Occurrences with merging and CXTM validation
[topic-maps.git] / src / cxtm / package.lisp
1 (defpackage #:topic-maps.cxtm
2 (:use #:cl #:topic-maps.tmdm)
3 (:export #:canonicalize #:canonicalize-octets #:write-cxtm
4 #:cxtm-error #:cxtm-unsupported #:error-code #:error-detail))
5 (in-package #:topic-maps.cxtm)
6 (define-condition cxtm-error (error)
7 ((code :initarg :code :reader error-code)
8 (detail :initarg :detail :reader error-detail))
9 (:report (lambda (c out) (format out "CXTM ~A: ~A" (error-code c) (error-detail c)))))
10 (define-condition cxtm-unsupported (cxtm-error) ())
11 (defun fail (code detail &optional unsupported)
12 (error (if unsupported 'cxtm-unsupported 'cxtm-error) :code code :detail detail))