]> dreyeck.freedombox.rocks Git - topic-maps.git/blobdiff - tests/xtm-occurrences.lisp
perf(tmdm): index topic normalization merge candidates
[topic-maps.git] / tests / xtm-occurrences.lisp
index 6e1bd8bf2567617a2887ddae445a8989e546de69..37920cbd35cc89e4edecdb009cc2cd4bec55ada0 100644 (file)
       ("text-child" "<occurrence>unexpected</occurrence>" xtm-rejection :unexpected-text)
       ("relative-datatype" "<occurrence><type><topicRef href='#t'/></type><resourceData datatype='relative'>V</resourceData></occurrence>" xtm-rejection :invalid-resource-data-datatype)
       ("embedded-without-anyType" "<occurrence><type><topicRef href='#t'/></type><resourceData><x xmlns='urn:xml'/></resourceData></occurrence>" xtm-rejection :unexpected-child)
-      ("anyType-text" "<occurrence><type><topicRef href='#t'/></type><resourceData datatype='http://www.w3.org/2001/XMLSchema#anyType'>V</resourceData></occurrence>" xtm-unsupported :resource-data-datatype)
-      ("anyType-XML" "<occurrence><type><topicRef href='#t'/></type><resourceData datatype='http://www.w3.org/2001/XMLSchema#anyType'><x xmlns='urn:xml'/></resourceData></occurrence>" xtm-unsupported :resource-data-datatype)
-      ("item-identity" "<occurrence reifier='#excluded'><itemIdentity href='urn:o'/><type><topicRef href='#t'/></type><resourceData>V</resourceData></occurrence>" xtm-unsupported :unsupported-construct)
-      ("reification" "<occurrence reifier='#r'><type><topicRef href='#t'/></type><resourceData>V</resourceData></occurrence>" xtm-unsupported :unsupported-construct)))
+      ("anyType-text" "<occurrence><type><topicRef href='#t'/></type><resourceData datatype='http://www.w3.org/2001/XMLSchema#anyType'>V</resourceData></occurrence>" xtm-unsupported :resource-resolver-required)
+      ("anyType-XML" "<occurrence><type><topicRef href='#t'/></type><resourceData datatype='http://www.w3.org/2001/XMLSchema#anyType'><x xmlns='urn:xml'/></resourceData></occurrence>" xtm-unsupported :resource-resolver-required)
+      ("item-identity" "<occurrence reifier='#excluded'><itemIdentity href='urn:o'/><type><topicRef href='#t'/></type><resourceData datatype='http://www.w3.org/2001/XMLSchema#anyType'>V</resourceData></occurrence>" xtm-unsupported :resource-resolver-required)
+      ("reification" "<occurrence reifier='#r'><type><topicRef href='#t'/></type><resourceData datatype='http://www.w3.org/2001/XMLSchema#anyType'>V</resourceData></occurrence>" xtm-unsupported :resource-resolver-required)))
     (destructuring-bind (label body class code) spec
       (let* ((key (concatenate 'string "occurrence-negative:" label))
-             (c (condition-from (lambda () (deserialize-octets (bytes (document (format nil "<topic id='a'>~A</topic>" body)))
+             (source (ss-unsupported-source (document (format nil "<topic id='a'>~A</topic>" body)) code label))
+             (c (condition-from (lambda () (deserialize-octets (bytes source)
                    :document-iri *document* :source-key key)))))
         (check (concatenate 'string key ":actual-class-code-context-position")
           (and (eq (type-of c) class) (eq code (error-code c)) (equal *document* (error-document-iri c))
             (equal key (error-source-key c)) (plusp (error-line c)) (plusp (error-column c))))
-        (push (mm-fields "label" key "sourceText" (document (format nil "<topic id='a'>~A</topic>" body)) "condition" (occurrence-condition c)) *occurrence-controls*))))
+        (push (mm-fields "label" key "sourceText" source "condition" (occurrence-condition c)) *occurrence-controls*))))
   (dolist (body '("<occurrence/>" "<topic id='a'><name><value>N</value><occurrence/></name></topic>"))
     (let ((c (condition-from (lambda () (read-body body)))))
       (check (concatenate 'string "occurrence-negative:invalid-parent-context:" body) (and (typep c 'xtm-rejection) (eq :unexpected-element (error-code c))))