Skip to content

Commit

Permalink
Update get-nq.xql
Browse files Browse the repository at this point in the history
edit $arranger.lines to only display text content of element (i.e., not authority file URL)
  • Loading branch information
mss2221 committed May 29, 2024
1 parent 03c1870 commit 38a82f8
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion exist/xql/lod/get-nq.xql
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,24 @@ let $pubPlace.line :=
let $pubDate := '"' || lod:resolveDateToString($file//mei:manifestation/mei:pubStmt/mei:date) || '"'
let $pubDate.line := $file.subject || $lod:gndo.dateOfPublication || $pubDate || $lod:nq.eol

(: Originally, app pulled data from authority file if available. Current version of app
does not support this, so $arranger.line was changed to return plain text content of
<arranger> element (only) :)

(:
let $arranger.lines :=
for $arranger in $file//mei:expression/mei:arranger/mei:persName[@auth.uri or (./text() and string-length(normalize-space(./text())) gt 0)]
let $arranger.line :=
if ($arranger/@auth.uri)
then ($file.subject || $lod:gndo.arranger || '<' || $arranger/@auth.uri || '>' || $lod:nq.eol)
else ($file.subject || $lod:gndo.arranger || '"' || $arranger/normalize-space(text()) || '"' || $lod:nq.eol)
return $arranger.line
:)

let $arranger.lines :=
for $arranger in $file//mei:expression/mei:arranger/mei:persName[@auth.uri or (./text() and string-length(normalize-space(./text())) gt 0)]
let $arranger.line := ($file.subject || $lod:gndo.arranger || '"' || $arranger/normalize-space(text()) || '"' || $lod:nq.eol)
return $arranger.line

let $publisher :=
if ($file//mei:manifestation/mei:pubStmt/mei:publisher/mei:corpName/@auth.uri)
Expand Down Expand Up @@ -189,4 +200,4 @@ return
$workComposerLabel.line ||
$workIdentifier.line ||
$mei.lines ||
$iiif.lines
$iiif.lines

0 comments on commit 38a82f8

Please sign in to comment.