+(defun read-item-reifier (node item map)
+ ;; XTM 4.3.2 looks up Item Identifiers only, unlike topicRef (4.20).
+ ;; INTERN-TOPIC adds the II on a miss; any SI/II identity merging then
+ ;; follows the existing TMDM rules, independently of this lookup.
+ (when (attr node "reifier")
+ (let* ((iri (resolve-iri (attr node "reifier") *document-iri* node))
+ (topic (or (find iri (topic-maps.tmdm:topic-map-topics map)
+ :test (lambda (iri topic)
+ (member iri (topic-maps.tmdm:topic-item-identifiers topic) :test #'string=)))
+ (topic-maps.tmdm:intern-topic map :item-identifier iri))))
+ (return-from read-item-reifier (topic-maps.tmdm:set-item-reifier item topic))))
+ item)
+(defun read-map-reifier (node map)
+ (read-item-reifier node map map))