Skip to content

Commit

Permalink
final updates of the BEACON xql
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandaalvaf committed Jan 2, 2024
1 parent 7f29ead commit 5defc2f
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions app/modules/BEACON_gen.xql
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let $header :=
concat(
"#FORMAT: BEACON
",
"#NAME: Digital Edition of Fernando Pessoa
",
"#TARGET: http://www.pessoadigital.pt/de/index/
",
"#TARGET: http://www.pessoadigital.pt/
",
"#FEED: http://www.pessoadigital.pt/de/index/names/lod/PD_BEACON.txt
",
"#CONTACT: Ulrike Henny-Krahmer <[email protected]> 
",
"#MESSAGE: Mentions in the digital edition of Fernando Pessoa
",
Expand All @@ -32,35 +32,35 @@ return (
let $person_id := $person/@xml:id
return (
for $viaf_id in $person/tei:idno[@type='viaf']
return if ($viaf_id) then concat('http://viaf.org/viaf/',$viaf_id, '||', 'names#',$person_id, '
') else (),
return if ($viaf_id) then concat('http://viaf.org/viaf/',$viaf_id, '||', 'index/names#',$person_id, '
') else (),
for $gnd_id in $person/tei:idno[@type='gnd']
return if ($gnd_id) then concat('http://d-nb.info/gnd/',$gnd_id, '||', 'names#',$person_id, '
') else (),
return if ($gnd_id) then concat('http://d-nb.info/gnd/',$gnd_id, '||', 'index/names#',$person_id, '
') else (),
for $wikidata_id in $person/tei:idno[@type='wikidata']
return if ($wikidata_id) then concat('https://www.wikidata.org/wiki/',$wikidata_id, '||', 'names#',$person_id, '
') else ()
return if ($wikidata_id) then concat('https://www.wikidata.org/wiki/',$wikidata_id, '||', 'index/names#',$person_id, '
') else ()
)
),
(
for $periodical in $doc//tei:list[@type='periodical']/tei:item
let $periodical_id := $periodical/@xml:id/data(.)
return (
for $viaf_id in $periodical/tei:idno[@type='viaf']
return if ($viaf_id) then concat('http://viaf.org/viaf/',$viaf_id, '||', 'periodicals#',$periodical_id, '
') else (),
return if ($viaf_id) then concat('http://viaf.org/viaf/',$viaf_id, '||', 'index/periodicals#',$periodical_id, '
') else (),
for $gnd_id in $periodical/tei:idno[@type='gnd']
return if ($gnd_id) then concat('http://d-nb.info/gnd/',$gnd_id, '||', 'periodicals#',$periodical_id, '
') else (),
return if ($gnd_id) then concat('http://d-nb.info/gnd/',$gnd_id, '||', 'index/periodicals#',$periodical_id, '
') else (),
for $wikidata_id in $periodical/tei:idno[@type='wikidata']
return if ($wikidata_id) then concat('https://www.wikidata.org/wiki/',$wikidata_id, '||', 'periodicals#',$periodical_id, '
') else ()
return if ($wikidata_id) then concat('https://www.wikidata.org/wiki/',$wikidata_id, '||', 'index/periodicals#',$periodical_id, '
') else ()
)
),
(
for $publication in $doc//tei:list[@type='publications']/tei:item
let $publication_id := $publication/@xml:id/data(.)
return (
for $viaf_id in $publication/tei:idno[@type='viaf']
return if ($viaf_id) then concat('http://viaf.org/viaf/',$viaf_id, '||', 'publications#',$publication_id, '
') else (),
return if ($viaf_id) then concat('http://viaf.org/viaf/',$viaf_id, '||', 'pub/',$publication_id, '
') else (),
for $gnd_id in $publication/tei:idno[@type='gnd']
return if ($gnd_id) then concat('http://d-nb.info/gnd/',$gnd_id, '||', 'publications#',$publication_id, '
') else (),
return if ($gnd_id) then concat('http://d-nb.info/gnd/',$gnd_id, '||', 'pub/',$publication_id, '
') else (),
for $wikidata_id in $publication/tei:idno[@type='wikidata']
return if ($wikidata_id) then concat('https://www.wikidata.org/wiki/',$wikidata_id, '||', 'publications#',$publication_id, '
') else ()
return if ($wikidata_id) then concat('https://www.wikidata.org/wiki/',$wikidata_id, '||', 'pub/',$publication_id, '
') else ()
)
)
)
Expand Down

0 comments on commit 5defc2f

Please sign in to comment.