- (if type-node
- (topic-maps.tmdm:add-name owner value
- :type (find-reference-topic map (reference-iri (first (elements type-node)))))
- (topic-maps.tmdm:add-default-name owner value))))
+ ;; ADD-NAME owns canonical set semantics and normalization after merging.
+ (let ((name (if type-node
+ (topic-maps.tmdm:add-name owner value :type type :scope scope)
+ (topic-maps.tmdm:add-default-name owner value :scope scope))))
+ ;; Item identifiers belong to the canonical Name, never its owner/type.
+ ;; Use the shared model API for set semantics and global conflicts.
+ (dolist (child children name)
+ (when (string= (node-name child) "itemIdentity")
+ (setf name (topic-maps.tmdm:add-item-identifier name (leaf-href child))))))))