Skip to content

Commit

Permalink
Set identifiers to empty if no cite
Browse files Browse the repository at this point in the history
  • Loading branch information
dragon-dxw committed Jan 14, 2025
1 parent cde27fb commit 8681577
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion corb2/migrate-ncn.xqy
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ let $slug := fn:replace(
let $log := ("")
let $uuid := "id-"||sem:uuid-string()
let $log := ($log, "Processing", $URI, $cite, $uuid)
let $node :=

let $node := if ($cite) then (
<identifiers><identifier>
<namespace>ukncn</namespace>
<uuid>{$uuid}</uuid>
<value>{$cite}</value>
<url_slug>{$slug}</url_slug>
</identifier></identifiers>
) else (<identifiers/>)

let $log := ($log, if ($cite) then () else "cite empty at " || $URI)

Expand Down

0 comments on commit 8681577

Please sign in to comment.