]> dreyeck.freedombox.rocks Git - topic-maps.git/blob - tests/xtm-variant-uri-data.lisp
docs(tmdm): coverage matrix, relationship readers, default name types; run report
[topic-maps.git] / tests / xtm-variant-uri-data.lisp
1 (in-package #:topic-maps.xtm.tests)
2
3 (defun uri-data-original-contract ()
4 (setf *uri-data-outputs* nil)
5 (dolist (spec '(("variant-resourcedata-uri" "http://example.org/command.wav" "http://example.org/command.wav" 621)))
6 (destructuring-bind (stem source-text value baseline-bytes) spec
7 (let* ((id (format nil "xtm2/in/~A.xtm" stem))
8 (*document* (concatenate 'string "https://xtm-tests.example.invalid/cd165b150176c1d6842b37be9cc9051b40d4996b/" id))
9 (raw (file-bytes (corpus-path id))) (copy (copy-seq raw))
10 (expected (file-bytes (corpus-path (format nil "xtm2/baseline/~A.xtm.cxtm" stem))))
11 (case (topic-maps.test-foundation:make-test-case :id id :category :valid
12 :source-pathname (corpus-path id) :document-iri *document* :expected-outcome :cxtm-equal
13 :expected-baseline (corpus-path (format nil "xtm2/baseline/~A.xtm.cxtm" stem))
14 :clauses '("XTM 2.0 4.3.3,4.3.4,4.12,4.13,4.17" "TMDM 5.5,6.4" "CXTM 3,4")))
15 (map nil) (actual nil) (c nil) (label (concatenate 'string "uri-data-original:" stem)))
16 (setf *cases* (append *cases* (list case)))
17 (handler-case
18 (progn
19 (setf map (deserialize-octets raw :document-iri *document* :source-key id))
20 (let* ((owner (by-id map "topic")) (name (first (topic-names owner)))
21 (v (first (topic-name-variants name))) (theme (by-id map "command"))
22 (before (variant-state map))
23 (root (topic-maps.xml:parse-octets raw (make-instance 'topic-maps.xtm::source-handler)))
24 (source-topic (first (topic-maps.xtm::elements root)))
25 (source-name (first (topic-maps.xtm::elements source-topic)))
26 (source-variant (second (topic-maps.xtm::elements source-name)))
27 (resource (second (topic-maps.xtm::elements source-variant))))
28 ;; Inspect the actual original's resource node, not its filename.
29 (check (concatenate 'string label ":original-resource-text-and-datatype")
30 (and (equal "resourceData" (topic-maps.xtm::node-name resource))
31 (equal (iri-datatype) (topic-maps.xtm::attr resource "datatype"))
32 (equal source-text (apply #'concatenate 'string (topic-maps.xtm::node-children resource)))
33 (= baseline-bytes (length expected))))
34 (check (concatenate 'string label ":native-parent-value-datatype-scope-eq")
35 (and (= 3 (length (topic-map-topics map))) (null (topic-map-associations map))
36 (= 1 (length (all-variants map))) (= 1 (length (topic-names owner)))
37 (eq name (canonical-topic-name name)) (eq owner (topic-name-parent name))
38 (eq name (variant-parent v)) (eq v (canonical-variant v))
39 (equal "Topic" (topic-name-value name)) (null (topic-name-scope name))
40 (equal value (variant-value v)) (equal (iri-datatype) (variant-datatype v))
41 (scope-eq-p (variant-scope v) (list theme)) (variants-current-p map)))
42 (check (concatenate 'string label ":resource-does-not-create-topic-identifiers")
43 (and (equal (list (concatenate 'string *document* "#topic")) (item-identifiers owner))
44 (equal (list (concatenate 'string *document* "#command")) (item-identifiers theme))
45 (every (lambda (topic) (and (null (topic-subject-locators topic))
46 (if (eq topic (topic-name-type name))
47 (and (null (item-identifiers topic)) (equal (list (default-name-type-identifier)) (topic-subject-identifiers topic)))
48 (null (topic-subject-identifiers topic))))) (topic-map-topics map))
49 (null (item-identifiers map)) (null (item-identifiers name)) (null (item-identifiers v))
50 (null (item-reifier name)) (null (item-reifier v))
51 (topic-maps.tmdm::validate-map-item-identifiers map)))
52 (setf actual (topic-maps.cxtm:canonicalize-octets map :base-locator *document*))
53 (check (concatenate 'string label ":source-preserved-pure-deterministic")
54 (and (equalp raw copy) (equal before (variant-state map))
55 (equalp actual (topic-maps.cxtm:canonicalize-octets map :base-locator *document*))
56 (equal before (variant-state map))))
57 (let ((other (deserialize-octets raw :document-iri *document* :source-key "independent:uri-data-provenance")))
58 (check (concatenate 'string label ":source-key-independent-model-and-cxtm")
59 (and (equalp (variant-model-data map) (variant-model-data other))
60 (equalp actual (topic-maps.cxtm:canonicalize-octets other :base-locator *document*)))))))
61 (error (condition) (setf c condition)))
62 (record-original-result case actual expected c)
63 (push (topic-maps.test-foundation::fields "id" id "documentIRI" *document* "sourceKey" id
64 "sourceBytes" (length raw) "sourceHex" (format nil "~{~2,'0X~}" (coerce raw 'list))
65 "sourceText" (babel:octets-to-string raw :encoding :utf-8) "resourceText" source-text "absoluteValue" value
66 "model" (when map (variant-model-data map)) "condition" (negative-condition-data c)
67 "actualCXTM" (when actual (babel:octets-to-string actual :encoding :utf-8))
68 "expectedCXTM" (babel:octets-to-string expected :encoding :utf-8)
69 "actualBytes" (when actual (length actual)) "expectedBytes" (length expected)
70 "firstDifferentByte" (when actual (mismatch actual expected))
71 "status" (string-downcase (string (topic-maps.test-foundation:test-case-status case)))) *uri-data-outputs*)
72 (when c (error c))
73 (check (concatenate 'string label ":byte-exact") (equalp actual expected)))))
74 (setf *uri-data-outputs* (nreverse *uri-data-outputs*))
75 (check "uri-data-originals:60-unique-case-records"
76 (and (= 60 (length *cases*)) (= 52 (count :valid *cases* :key #'topic-maps.test-foundation:test-case-category))
77 (= 60 (length (remove-duplicates *cases* :key #'topic-maps.test-foundation:test-case-id :test #'equal))))))
78
79 (defun uri-data-xml (value themes)
80 (format nil "<variant>~A<resourceData datatype='http://www.w3.org/2001/XMLSchema#anyURI'>~A</resourceData></variant>" (scope-xml themes) value))
81
82 (defun uri-data-value-controls ()
83 (dolist (row '(("absolute-no-fragment" "https://external.invalid/file.xml" "https://external.invalid/file.xml")
84 ("relative" "../resource.wav" "https://xtm-tests.example.invalid/cd165b150176c1d6842b37be9cc9051b40d4996b/xtm2/resource.wav")
85 ("fragment-not-shorthand" "#not/a/shorthand" "https://xtm-tests.example.invalid/cd165b150176c1d6842b37be9cc9051b40d4996b/xtm2/in/example.xtm#not/a/shorthand")
86 ("empty-reference" "" "https://xtm-tests.example.invalid/cd165b150176c1d6842b37be9cc9051b40d4996b/xtm2/in/example.xtm")
87 ("unicode" "urn:馬籠🦊" "urn:馬籠🦊") ("percent-utf8" "urn:%E9%A6%AC%F0%9F%A6%8A" "urn:馬🦊")
88 ("percent-reserved" "https://external.invalid/a%2Fb%23part" "https://external.invalid/a/b#part")
89 ("XML-escaping-once" "https://external.invalid/?a=1&amp;b=2" "https://external.invalid/?a=1&b=2")
90 ("urn-no-fragment" "urn:external" "urn:external")
91 ("file-no-read" "file:///nonexistent-21i/resource.xml" "file:///nonexistent-21i/resource.xml")))
92 (destructuring-bind (label href value) row
93 (variant-control (concatenate 'string "uri-data:" label)
94 (format nil "<topic id='a'>~A</topic>" (variant-name-xml nil (uri-data-xml href '("s"))))
95 (lambda (map)
96 (let* ((owner (by-id map "a")) (name (first (topic-names owner))) (v (first (all-variants map)))
97 (comparison (read-body (format nil "<topic id='a'>~A</topic>" (variant-name-xml nil (variant-xml "text" '("s")))))))
98 (check (concatenate 'string "uri-data:value-datatype-parent-no-topic-effects:" label)
99 (and (equal value (variant-value v)) (equal (iri-datatype) (variant-datatype v))
100 (eq owner (topic-name-parent name)) (eq name (variant-parent v)) (eq v (canonical-variant v))
101 (scope-eq-p (variant-scope v) (list (by-id map "s")))
102 (equalp (original-model-data map) (original-model-data comparison)))))))))
103 (let ((*document* "https://other.invalid/maps/input.xtm?version=2"))
104 (variant-control "uri-data:alternate-document"
105 (format nil "<topic id='a'>~A</topic>" (variant-name-xml nil (uri-data-xml "sound.wav" '("s"))))
106 (lambda (map) (check "uri-data:alternate-document-absolute-value"
107 (and (equal "https://other.invalid/maps/sound.wav" (variant-value (first (all-variants map))))
108 (equal (list (concatenate 'string *document* "#a")) (item-identifiers (by-id map "a"))))))))
109 (variant-control "uri-data:inherited-scope-duplicates-forward"
110 (format nil "<topic id='a'>~A</topic><topic id='base'/><topic id='s'/><topic id='t'/>"
111 (variant-name-xml '("base") (concatenate 'string
112 (uri-data-xml "urn:sound" '("base" "s" "t" "s")) (uri-data-xml "urn:sound" '("t" "s")))))
113 (lambda (map) (let* ((name (first (topic-names (by-id map "a")))) (v (first (all-variants map))))
114 (check "uri-data:scope-union-and-variant-normalization"
115 (and (= 1 (length (all-variants map))) (equal "urn:sound" (variant-value v))
116 (equal (iri-datatype) (variant-datatype v)) (eq name (variant-parent v))
117 (scope-eq-p (topic-name-scope name) (list (by-id map "base")))
118 (scope-eq-p (variant-scope v) (list (by-id map "base") (by-id map "s") (by-id map "t"))))))))
119 (variant-control "uri-data:distinct-values-datatypes-scopes-and-normalized-iris"
120 (format nil "<topic id='a'>~A</topic>" (variant-name-xml nil (concatenate 'string
121 (uri-data-xml "urn:a" '("s")) (uri-data-xml "urn:%61" '("s"))
122 (uri-data-xml "urn:b" '("s")) (uri-data-xml "urn:a" '("t")) (variant-xml "urn:a" '("s")))))
123 (lambda (map)
124 (check "uri-data:equality-is-value-datatype-scope-not-topic-identity"
125 (and (= 4 (length (all-variants map))) (= 4 (length (topic-map-topics map)))
126 (= 3 (count (iri-datatype) (all-variants map) :key #'variant-datatype :test #'equal))
127 (= 1 (count (string-datatype) (all-variants map) :key #'variant-datatype :test #'equal))))))
128 (variant-control "uri-data:same-locator-does-not-identify-topics"
129 (format nil "<topic id='a'><subjectIdentifier href='urn:shared'/>~A</topic><topic id='b'><subjectLocator href='urn:shared'/>~A</topic>"
130 (variant-name-xml nil (uri-data-xml "urn:shared" '("s")))
131 (variant-name-xml nil (uri-data-xml "urn:shared" '("s"))))
132 (lambda (map)
133 (check "uri-data:resource-identity-separated-from-SI-SL-II"
134 (and (not (eq (by-id map "a") (by-id map "b"))) (= 4 (length (topic-map-topics map)))
135 (= 2 (length (all-variants map)))
136 (equal '("urn:shared") (topic-subject-identifiers (by-id map "a")))
137 (equal '("urn:shared") (topic-subject-locators (by-id map "b")))
138 (equal (list (concatenate 'string *document* "#a")) (item-identifiers (by-id map "a")))
139 (equal (list (concatenate 'string *document* "#b")) (item-identifiers (by-id map "b")))))))
140 ;; One primary XML parse only, even for an unreachable external .xml locator.
141 (let ((saved (symbol-function 'topic-maps.xml:parse-octets)) (calls 0))
142 (unwind-protect
143 (progn
144 (setf (symbol-function 'topic-maps.xml:parse-octets)
145 (lambda (&rest args) (incf calls) (apply saved args)))
146 (read-body (format nil "<topic id='a'>~A</topic>"
147 (variant-name-xml nil (uri-data-xml "https://unreachable.invalid/external.xml" '("s")))))
148 (check "uri-data:one-primary-XML-parse-no-recursive-deserialization" (= 1 calls)))
149 (setf (symbol-function 'topic-maps.xml:parse-octets) saved))))
150
151 (defun uri-data-equivalence-controls ()
152 (let* ((value "relative-resource.wav")
153 (ref-body (format nil "<topic id='a'>~A</topic>" (variant-name-xml '("base") (resource-ref-xml value '("extra")))))
154 (data-body (format nil "<topic id='a'>~A</topic>" (variant-name-xml '("base") (uri-data-xml value '("extra")))))
155 (map (read-body data-body)) (ref-map (read-body ref-body))
156 (both (read-body (format nil "<topic id='a'>~A</topic>" (variant-name-xml '("base")
157 (concatenate 'string (resource-ref-xml value '("extra")) (uri-data-xml value '("extra")))))))
158 (name (first (topic-names (by-id both "a")))) (v (first (all-variants both)))
159 (expected "https://xtm-tests.example.invalid/cd165b150176c1d6842b37be9cc9051b40d4996b/xtm2/in/relative-resource.wav"))
160 (check "uri-data:resourceRef-equivalent-native-model-value-type-scope-and-cxtm"
161 (and (equalp (variant-model-data map) (variant-model-data ref-map))
162 (equalp (variant-model-data both) (variant-model-data ref-map))
163 (equal expected (variant-value v)) (equal (iri-datatype) (variant-datatype v))
164 (= 4 (length (topic-map-topics both))) (= 1 (length (all-variants both)))
165 (eq v (canonical-variant v)) (eq name (variant-parent v))
166 (scope-eq-p (variant-scope v) (list (by-id both "base") (by-id both "extra")))
167 (equalp (topic-maps.cxtm:canonicalize-octets map :base-locator *document*)
168 (topic-maps.cxtm:canonicalize-octets ref-map :base-locator *document*))
169 (equalp (topic-maps.cxtm:canonicalize-octets both :base-locator *document*)
170 (topic-maps.cxtm:canonicalize-octets ref-map :base-locator *document*))))
171 (push (topic-maps.test-foundation::fields "label" "uri-data:resourceRef-equivalence"
172 "kind" "synthetic-equivalence-not-original" "resourceRefSource" (document ref-body)
173 "resourceDataSource" (document data-body) "absoluteValue" expected "model" (variant-model-data both)
174 "actualCXTM" (babel:octets-to-string (topic-maps.cxtm:canonicalize-octets both :base-locator *document*) :encoding :utf-8)) *variant-controls*))
175 (let ((old-name nil) (old-variant nil) (*name-controls* nil))
176 (staged-name-control "uri-data:mixed-forms-retained-handles"
177 (format nil "<topic id='a'><itemIdentity href='urn:shared'/>~A</topic><topic id='b'><itemIdentity href='urn:shared'/>~A</topic>"
178 (variant-name-xml '("base") (resource-ref-xml "sound.wav" '("extra")))
179 (variant-name-xml '("base") (uri-data-xml "sound.wav" '("extra"))))
180 (lambda (map step)
181 (when (= step 1)
182 (setf old-name (first (topic-names (by-id map "a"))) old-variant (first (all-variants map)))))
183 (lambda (map)
184 (let* ((owner (by-id map "a")) (name (first (topic-names owner))) (v (first (all-variants map))))
185 (check "uri-data:mixed-forms-canonical-parent-name-variant-eq"
186 (and (eq owner (by-id map "b")) (= 1 (length (all-variants map)))
187 (eq name (canonical-topic-name old-name)) (eq owner (topic-name-parent name))
188 (eq v (canonical-variant old-variant)) (eq name (variant-parent old-variant))
189 (equal (iri-datatype) (variant-datatype v)) (variants-current-p map)))
190 (push (topic-maps.test-foundation::fields "label" "uri-data:mixed-forms-retained-handles"
191 "kind" "staged-native-reader-control" "model" (variant-model-data map)) *variant-controls*))))))
192
193 (defun uri-data-error-controls ()
194 (dolist (row '(("invalid-iri" "bad space" :invalid-iri)
195 ("leading-space-not-trimmed" " urn:x" :invalid-iri)
196 ("trailing-space-not-trimmed" "urn:x " :invalid-iri)
197 ("tab-not-trimmed" "urn:x&#x9;" :invalid-iri)
198 ("invalid-decoded-iri" "urn:x%00" :invalid-iri)
199 ("invalid-relative-iri" "1bad:relative" :invalid-iri)
200 ("percent-short" "urn:x%2" :invalid-percent-escape)
201 ("percent-hex" "urn:x%GG" :invalid-percent-escape)
202 ("percent-incomplete-utf8" "urn:x%C3" :invalid-percent-utf8)
203 ("percent-overlong-utf8" "urn:x%C0%AF" :invalid-percent-utf8)
204 ("percent-surrogate" "urn:x%ED%A0%80" :invalid-percent-utf8)))
205 (variant-error-control (concatenate 'string "uri-data:" (first row))
206 (format nil "<topic id='a'>~A</topic>" (variant-name-xml nil (uri-data-xml (second row) '("s"))))
207 'xtm-rejection (third row)))
208 (dolist (row '(("extra-attribute" "<resourceData datatype='http://www.w3.org/2001/XMLSchema#anyURI' extra='bad'>urn:x</resourceData>" :unexpected-attribute)
209 ("relative-datatype" "<resourceData datatype='relative'>urn:x</resourceData>" :invalid-resource-data-datatype)
210 ("empty-datatype" "<resourceData datatype=''>urn:x</resourceData>" :invalid-resource-data-datatype)
211 ("invalid-datatype-scheme" "<resourceData datatype='1bad:datatype'>urn:x</resourceData>" :invalid-resource-data-datatype)
212 ("invalid-datatype-IRI" "<resourceData datatype='urn:bad datatype'>urn:x</resourceData>" :invalid-iri)
213 ("invalid-datatype-percent" "<resourceData datatype='urn:x%GG'>urn:x</resourceData>" :invalid-percent-escape)
214 ("foreign-child" "<resourceData datatype='http://www.w3.org/2001/XMLSchema#anyURI'><x xmlns='urn:foreign'>urn:x</x></resourceData>" :unexpected-child)
215 ("XTM-child" "<resourceData datatype='http://www.w3.org/2001/XMLSchema#anyURI'><value>urn:x</value></resourceData>" :unexpected-child)))
216 (variant-error-control (concatenate 'string "uri-data:" (first row))
217 (format nil "<topic id='a'><name><value>N</value><variant><scope><topicRef href='#s'/></scope>~A</variant></name></topic>" (second row))
218 'xtm-rejection (third row)))
219 (dolist (row '(("mixed-resources" "<scope><topicRef href='#s'/></scope><resourceData datatype='http://www.w3.org/2001/XMLSchema#anyURI'>urn:x</resourceData><resourceRef href='urn:x'/>" :variant-resource-cardinality)
220 ("multiple-data" "<scope><topicRef href='#s'/></scope><resourceData datatype='http://www.w3.org/2001/XMLSchema#anyURI'>urn:x</resourceData><resourceData datatype='http://www.w3.org/2001/XMLSchema#anyURI'>urn:y</resourceData>" :variant-resource-cardinality)
221 ("wrong-order" "<resourceData datatype='http://www.w3.org/2001/XMLSchema#anyURI'>urn:x</resourceData><scope><topicRef href='#s'/></scope>" :missing-variant-scope)
222 ("scope-after-resource" "<scope><topicRef href='#s'/></scope><resourceData datatype='http://www.w3.org/2001/XMLSchema#anyURI'>urn:x</resourceData><scope><topicRef href='#t'/></scope>" :element-order)))
223 (variant-error-control (concatenate 'string "uri-data:" (first row))
224 (format nil "<topic id='a'><name><value>N</value><variant>~A</variant></name></topic>" (second row)) 'xtm-rejection (third row)))
225 (dolist (row '(("anyType-text-still-unsupported" "<resourceData datatype='http://www.w3.org/2001/XMLSchema#anyType'>42</resourceData>")
226 ("anyType-still-unsupported" "<resourceData datatype='http://www.w3.org/2001/XMLSchema#anyType'><x xmlns='urn:foreign'>XML</x></resourceData>")))
227 (variant-error-control (concatenate 'string "uri-data:" (first row))
228 (format nil "<topic id='a'><name><value>N</value><variant><scope><topicRef href='#s'/></scope>~A</variant></name></topic>" (second row))
229 'xtm-unsupported :resource-resolver-required)))
230
231 (defun uri-data-scope-controls ()
232 (dolist (row '(("equal-scope" ("base")) ("duplicate-scope-no-new-theme" ("base" "base"))))
233 (variant-error-control (concatenate 'string "uri-data:" (first row))
234 (format nil "<topic id='a'>~A</topic>" (variant-name-xml '("base") (uri-data-xml "urn:x" (second row))))
235 'variant-error :invalid-variant-scope))
236 (variant-error-control "uri-data:SI-alias-adds-no-theme"
237 "<topic id='base'><subjectIdentifier href='urn:base#alias'/></topic><topic id='a'><name><scope><topicRef href='#base'/></scope><value>N</value><variant><scope><topicRef href='urn:base#alias'/></scope><resourceData datatype='http://www.w3.org/2001/XMLSchema#anyURI'>urn:x</resourceData></variant></name></topic>"
238 'variant-error :invalid-variant-scope)
239 (variant-error-control "uri-data:forward-merge-collapses-proper-scope"
240 (format nil "<topic id='a'>~A</topic><topic id='base'><itemIdentity href='#extra'/></topic>"
241 (variant-name-xml '("base") (uri-data-xml "urn:x" '("extra")))) 'variant-error :variant-scope-collapse)
242 (let* ((key "uri-data:invalid-raw-UTF8")
243 (raw (concatenate '(vector (unsigned-byte 8))
244 (bytes "<topicMap xmlns='http://www.topicmaps.org/xtm/' version='2.0'><topic id='a'><name><value>N</value><variant><scope><topicRef href='#s'/></scope><resourceData datatype='http://www.w3.org/2001/XMLSchema#anyURI'>urn:")
245 #(255) (bytes "</resourceData></variant></name></topic></topicMap>")))
246 (c (condition-from (lambda () (deserialize-octets raw :document-iri *document* :source-key key)))))
247 (check "uri-data:invalid-raw-UTF8-is-XML-error"
248 (and (eq 'xtm-xml-error (type-of c)) (eq :xml-not-well-formed (error-code c))
249 (equal key (error-source-key c)) (equal *document* (error-document-iri c))))
250 (push (topic-maps.test-foundation::fields "label" key "kind" "invalid-XML-octets"
251 "sourceHex" (format nil "~{~2,'0X~}" (coerce raw 'list)) "condition" (negative-condition-data c)) *variant-controls*))
252 (dolist (kind '(:subject-identifier :subject-locator :item-identifier))
253 (let* ((element (ecase kind (:subject-identifier "subjectIdentifier") (:subject-locator "subjectLocator") (:item-identifier "itemIdentity")))
254 (body (format nil "<topic id='base'><~A href='urn:base'/></topic><topic id='extra'><~A href='urn:extra'/></topic><topic id='a'>~A</topic>"
255 element element (variant-name-xml '("base") (uri-data-xml "urn:resource" '("extra")))))
256 (map (read-body body)) (v (first (all-variants map))) (before (variant-state map))
257 (c (condition-from (lambda () (add-topic-identifier (by-id map "extra") kind "urn:base")))))
258 (check (format nil "uri-data:scope-collapse-~A-specific-atomic-eq" kind)
259 (and (eq 'variant-error (type-of c)) (eq :variant-scope-collapse (variant-error-code c))
260 (equal before (variant-state map)) (eq v (canonical-variant v)) (variants-current-p map)))
261 (push (topic-maps.test-foundation::fields "label" (format nil "uri-data:collapse-~A" kind)
262 "kind" "native-TMDM-collapse-atomicity" "sourceText" (document body)
263 "condition" (negative-condition-data c) "modelUnchanged" :true "model" (variant-model-data map)) *variant-controls*))))
264
265 (defun uri-data-tests ()
266 (let ((*variant-controls* nil))
267 (uri-data-value-controls)
268 (uri-data-equivalence-controls)
269 (variant-merge-controls (lambda (themes) (uri-data-xml "urn:resource" themes)) "uri-data-merge:"
270 (lambda (label map)
271 (check (concatenate 'string label ":absolute-resource-value-and-datatype")
272 (every (lambda (v) (and (equal "urn:resource" (variant-value v))
273 (equal (iri-datatype) (variant-datatype v)))) (all-variants map)))))
274 (uri-data-error-controls)
275 (uri-data-scope-controls)
276 (setf *uri-data-controls* (nreverse *variant-controls*))))