]> dreyeck.freedombox.rocks Git - topic-maps.git/blobdiff - tests/xtm-names.lisp
examples: explore project work through native Topic Maps (slice 22U)
[topic-maps.git] / tests / xtm-names.lisp
index b694b177164ff7c9f325eae4f2c52863926c2388..b45220a4b9b160c0f1aa9a6da06b4d4180cfb1ae 100644 (file)
     map))
 
 (defun name-error-control (label body class code)
-  (let* ((source (document body)) (key (concatenate 'string "name-syntax:" label))
+  (let* ((source (ss-unsupported-source (document body) code label)) (key (concatenate 'string "name-syntax:" label))
          (c (condition-from (lambda () (deserialize-octets (bytes source) :document-iri *document* :source-key key)))))
     (check (concatenate 'string key ":class-code") (and (eq class (type-of c)) (eq code (error-code c))))
     (check (concatenate 'string key ":context-position")
                   ("ii-after-value" "<name><value>N</value><itemIdentity href='#name'/></name>" :element-order)
                   ("variant-before-value" "<name><variant><scope><topicRef href='#s'/></scope><resourceData>V</resourceData></variant><value>N</value></name>" :element-order)))
     (name-error-control (first spec) (format nil "<topic id='a'>~A</topic>" (second spec)) 'xtm-rejection (third spec)))
-  (dolist (spec '(("variant-resourceData-datatype" "<name><value>N</value><variant><scope><topicRef href='#s'/></scope><resourceData datatype='http://www.w3.org/2001/XMLSchema#integer'>42</resourceData></variant></name>" :resource-data-datatype)
-                  ("variant-reifier" "<name><value>N</value><variant reifier='#r'><scope><topicRef href='#v'/></scope><resourceData>V</resourceData></variant></name>" :reification)))
+  (dolist (spec '(("variant-resourceData-datatype" "<name><value>N</value><variant><scope><topicRef href='#s'/></scope><resourceData datatype='http://www.w3.org/2001/XMLSchema#anyType'>42</resourceData></variant></name>" :resource-resolver-required)
+                  ("variant-reifier-excluded-datatype" "<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>" :resource-resolver-required)))
     (name-error-control (concatenate 'string "unsupported-" (first spec))
       (format nil "<topic id='a'>~A</topic>" (second spec)) 'xtm-unsupported (third spec)))
   (let* ((body (format nil "~%<topic id='a'>~% <name/>~%</topic>"))