]> dreyeck.freedombox.rocks Git - topic-maps.git/blobdiff - tests/xtm-resource-datatypes.lisp
test: prove CTM/XTM anyType equivalence (slice 22T)
[topic-maps.git] / tests / xtm-resource-datatypes.lisp
index 6b31c5a1297e643b7479cb5cbbfc02c308371f15..4229cf9c8c5b35c642d410ddb72893c567d7171b 100644 (file)
   (dolist (value '("text" "<x xmlns='urn:foreign'>XML</x>"))
     (variant-reifier-error-control (concatenate 'string "datatype:anyType:" value)
       (datatype-body (datatype-resource "http://www.w3.org/2001/XMLSchema#anyType" value))
-      'xtm-unsupported :resource-data-datatype))
+      'xtm-unsupported :resource-resolver-required))
   (variant-reifier-error-control "datatype:unknown-XTM-structure" "<topic id='a'><unknown/></topic>" 'xtm-rejection :unexpected-element)
   (variant-reifier-error-control "datatype:occurrence-remains-unsupported"
-    "<topic id='a'><occurrence><type><topicRef href='#t'/></type><resourceData datatype='urn:custom'>V</resourceData></occurrence></topic>"
-    'xtm-unsupported :unsupported-construct)
+    "<topic id='a'><occurrence reifier='#r'><type><topicRef href='#t'/></type><resourceData datatype='http://www.w3.org/2001/XMLSchema#anyType'>V</resourceData></occurrence></topic>"
+    'xtm-unsupported :resource-resolver-required)
   (variant-reifier-error-control "datatype:native-reifier-conflict"
     (format nil "<topic id='a'>~A</topic>" (variant-name-xml nil (concatenate 'string
       (datatype-variant "urn:custom" "A" :reifier "#r") (datatype-variant "urn:custom" "B" :reifier "#r"))))
       (lambda () (deserialize-octets raw :document-iri *document* :source-key "variant:datatype:raw-invalid-UTF8")))))
 
 (defun datatype-context-controls ()
-  ;; No XTM occurrence reader exists. Exercise the same validated resource node
-  ;; operation with both existing native value consumers, not occurrence parsing.
+  ;; Retain the resource-operation/native-consumer cross-check from Slice 22D.
+  ;; Slice 22G separately exercises genuine XTM occurrence deserialization.
   (dolist (resource (list (datatype-resource "urn:shared:type" " A&amp;B ")
                           (datatype-resource nil "V")
                           (datatype-resource (iri-datatype) "../sound")