]> dreyeck.freedombox.rocks Git - topic-maps.git/blobdiff - tests/xtm-map-reification.lisp
examples: explore project work through native Topic Maps (slice 22U)
[topic-maps.git] / tests / xtm-map-reification.lisp
index ca5bf1e3a25409dc7703f0d012caa870c250f9da..75933273220bd44674efabc5ea5cf8b77ffb6d2e 100644 (file)
       (push (topic-maps.test-foundation::fields "label" label "sourceText" source "model" (map-reifier-model-data map)
         "actualCXTM" (babel:octets-to-string actual :encoding :utf-8) "condition" nil) *map-reifier-controls*))))
 (defun map-reifier-error-control (label source class code &optional thunk map)
       (push (topic-maps.test-foundation::fields "label" label "sourceText" source "model" (map-reifier-model-data map)
         "actualCXTM" (babel:octets-to-string actual :encoding :utf-8) "condition" nil) *map-reifier-controls*))))
 (defun map-reifier-error-control (label source class code &optional thunk map)
+  (setf source (ss-unsupported-source source code label))
   (let* ((before (when map (map-reifier-state map)))
          (c (condition-from (or thunk (lambda () (deserialize-octets (bytes source) :document-iri *document* :source-key label)))))
          (actual-code (cond ((typep c 'topic-maps.xtm:xtm-error) (error-code c))
   (let* ((before (when map (map-reifier-state map)))
          (c (condition-from (or thunk (lambda () (deserialize-octets (bytes source) :document-iri *document* :source-key label)))))
          (actual-code (cond ((typep c 'topic-maps.xtm:xtm-error) (error-code c))
     ("identity-after-topic" "<topicMap xmlns='http://www.topicmaps.org/xtm/' version='2.0' reifier='#r'><topic id='r'/><itemIdentity href='urn:map'/></topicMap>" :element-order)
     ("reifier-child" "<topicMap xmlns='http://www.topicmaps.org/xtm/' version='2.0'><reifier href='#r'/></topicMap>" :unexpected-element)))
     (map-reifier-error-control (first row) (second row) 'xtm-rejection (third row)))
     ("identity-after-topic" "<topicMap xmlns='http://www.topicmaps.org/xtm/' version='2.0' reifier='#r'><topic id='r'/><itemIdentity href='urn:map'/></topicMap>" :element-order)
     ("reifier-child" "<topicMap xmlns='http://www.topicmaps.org/xtm/' version='2.0'><reifier href='#r'/></topicMap>" :unexpected-element)))
     (map-reifier-error-control (first row) (second row) 'xtm-rejection (third row)))
-  (dolist (row '(("name-with-variant-excluded-datatype" "<topic id='a'><name><value>N</value><variant reifier='#r'><scope><topicRef href='#v'/></scope><resourceData datatype='http://www.w3.org/2001/XMLSchema#anyType'>42</resourceData></variant></name></topic>" :resource-data-datatype)
-    ("variant-reifier-excluded-datatype" "<topic id='a'><name><value>N</value><variant reifier='#v'><scope><topicRef href='#s'/></scope><resourceData datatype='http://www.w3.org/2001/XMLSchema#anyType'>42</resourceData></variant></name></topic>" :resource-data-datatype)
-    ("occurrence-reification" "<topic id='a'><occurrence reifier='#o'><type><topicRef href='#t'/></type><resourceData datatype='http://www.w3.org/2001/XMLSchema#anyType'>O</resourceData></occurrence></topic>" :resource-data-datatype)
+  (dolist (row '(("name-with-variant-excluded-datatype" "<topic id='a'><name><value>N</value><variant reifier='#r'><scope><topicRef href='#v'/></scope><resourceData datatype='http://www.w3.org/2001/XMLSchema#anyType'>42</resourceData></variant></name></topic>" :resource-resolver-required)
+    ("variant-reifier-excluded-datatype" "<topic id='a'><name><value>N</value><variant reifier='#v'><scope><topicRef href='#s'/></scope><resourceData datatype='http://www.w3.org/2001/XMLSchema#anyType'>42</resourceData></variant></name></topic>" :resource-resolver-required)
+    ("occurrence-reification" "<topic id='a'><occurrence reifier='#o'><type><topicRef href='#t'/></type><resourceData datatype='http://www.w3.org/2001/XMLSchema#anyType'>O</resourceData></occurrence></topic>" :resource-resolver-required)
     ("association-role-reification" "<association reifier='#a'><type><topicRef href='#t'/></type><role reifier='#r%GG'><type><topicRef href='#rt'/></type><topicRef href='#p'/></role></association>" :invalid-percent-escape)
     ("mergeMap" "<mergeMap href='other.xtm'/>" :resource-resolver-required)))
     (map-reifier-error-control (first row) (map-reifier-xml "#map-r" (second row))
     ("association-role-reification" "<association reifier='#a'><type><topicRef href='#t'/></type><role reifier='#r%GG'><type><topicRef href='#rt'/></type><topicRef href='#p'/></role></association>" :invalid-percent-escape)
     ("mergeMap" "<mergeMap href='other.xtm'/>" :resource-resolver-required)))
     (map-reifier-error-control (first row) (map-reifier-xml "#map-r" (second row))