diff --git a/app/modules/RDF_gen.xql b/app/modules/RDF_gen.xql index c0e67585..4a0905d9 100644 --- a/app/modules/RDF_gen.xql +++ b/app/modules/RDF_gen.xql @@ -6,15 +6,16 @@ let $doc := doc('xmldb:exist:///db/apps/pessoa/data/indices.xml') let $ampersand := '&' (: ampersand :) let $tab := ' ' (: tab :) let $header := concat( - "@prefix ccehperson: . ", - "@prefix ccehperiodical: . ", - "@prefix ccehpublications: . ", + "@prefix pdperson: . ", + "@prefix pdperiodical: . ", + "@prefix pdpublication: . ", "@prefix crm: . ", "@prefix dbo: . ", "@prefix foaf: . ", "@prefix rdfs: . ", "@prefix wd: . ", "@prefix viaf: . ", + "@prefix gnd: ;", " " ) @@ -26,14 +27,14 @@ return ( let $gender := $person/tei:sex/data(.) let $labels := $person/tei:persName[not(@type='main')]/data(.) return ( - concat('ccehperson:',$person_id, ' a crm:E21_Person ;', ' '), + concat('pdperson:',$person_id, ' a crm:E21_Person ;', ' '), concat($tab,'rdfs:label "', $main_name,'" ;',' '), for $viaf_id in $person/tei:idno[@type='viaf'] - return if ($viaf_id) then concat($tab,'= ', 'viaf:',$viaf_id, '>', ' ;',' ') else (), + return if ($viaf_id) then concat($tab,'= ', 'viaf:',$viaf_id, ' ;',' ') else (), for $gnd_id in $person/tei:idno[@type='gnd'] - return if ($gnd_id) then concat($tab,'= ', '<','http://d-nb.info/gnd/',$gnd_id, '>', ' ;',' ') else (), + return if ($gnd_id) then concat($tab,'= ', 'gnd:',$gnd_id,' ;',' ') else (), for $wikidata_id in $person/tei:idno[@type='wikidata'] - return if ($wikidata_id) then concat($tab,'= ','wd:',$wikidata_id, '>', ' ;',' ') else (), + return if ($wikidata_id) then concat($tab,'= ','wd:',$wikidata_id, ' ;',' ') else (), concat($tab, 'foaf:gender "', $gender, '" ;',' '), if (exists($labels)) then concat($tab, 'foaf:name ') else (), ( @@ -48,29 +49,29 @@ return ( ), (for $periodical in $doc//tei:list[@type='periodical']/tei:item let $periodical_id := $periodical/@xml:id/data(.) - let $periodical_name := $periodical/tei:title/data(.) + let $periodical_name := $periodical/tei:title/normalize-space(data(.)) return( - concat('ccehperiodical:',$periodical_id, ' a dbo:Journal ;',' '), + concat('pdperiodical:',$periodical_id, ' a dbo:Journal ;',' '), concat($tab,'rdfs:label "', $periodical_name,'" ;',' '), for $viaf_id in $periodical/tei:idno[@type='viaf'] - return if ($viaf_id) then concat($tab,'= ', 'viaf:',$viaf_id, '>', ' ;',' ') else (), + return if ($viaf_id) then concat($tab,'= ', 'viaf:',$viaf_id, ' ;',' ') else (), for $gnd_id in $periodical/tei:idno[@type='gnd'] - return if ($gnd_id) then concat($tab,'= ', '<','http://d-nb.info/gnd/',$gnd_id, '>', ' ;',' ') else (), + return if ($gnd_id) then concat($tab,'= ','gnd:',$gnd_id, ' ;',' ') else (), for $wikidata_id in $periodical/tei:idno[@type='wikidata'] - return if ($wikidata_id) then concat($tab,'= ','wd:',$wikidata_id, '>', ' ;',' ') else (), + return if ($wikidata_id) then concat($tab,'= ','wd:',$wikidata_id, ' ;',' ') else (), ' ')), (for $publication in $doc//tei:list[@type='publications']/tei:item let $publication_id := $publication/@xml:id/data(.) - let $publication_name := $publication/tei:title/data(.) + let $publication_name := $publication/tei:title/normalize-space(data(.)) return( - concat('ccehpublication:',$publication_id, ' a dbo:LiteraryWork ;',' '), + concat('pdpublication:',$publication_id, ' a dbo:LiteraryWork ;',' '), concat($tab,'rdfs:label "', $publication_name,'" ;',' '), for $viaf_id in $publication/tei:idno[@type='viaf'] - return if ($viaf_id) then concat($tab,'= ', 'viaf:',$viaf_id, '>', ' ;',' ') else (), + return if ($viaf_id) then concat($tab,'= ', 'viaf:',$viaf_id, ' ;',' ') else (), for $gnd_id in $publication/tei:idno[@type='gnd'] - return if ($gnd_id) then concat($tab,'= ', '<','http://d-nb.info/gnd/',$gnd_id, '>', ' ;',' ') else (), + return if ($gnd_id) then concat($tab,'= ', 'gnd:',$gnd_id, ' ;',' ') else (), for $wikidata_id in $publication/tei:idno[@type='wikidata'] - return if ($wikidata_id) then concat($tab,'= ','wd:',$wikidata_id, '>', ' ;',' ') else (), + return if ($wikidata_id) then concat($tab,'= ','wd:',$wikidata_id, ' ;',' ') else (), ' ')) ) diff --git a/app/resources/lists.xml b/app/resources/lists.xml index 46643032..7296464d 100644 --- a/app/resources/lists.xml +++ b/app/resources/lists.xml @@ -893,20 +893,20 @@ Sepúlveda, Pedro, Ulrike Henny-Krahmer e Jorge Uribe (eds). - . Lisboa/Colónia: IELT/CCeH, 2017-2023. Versão A2.0.0-C2.0.0 + . Lisboa/Colónia: IELT/CCeH, 2017-2023. Versão A3.0.0-C2.1.0 10.18716/cceh/pessoa Sepúlveda, Pedro, Ulrike Henny-Krahmer, and Jorge Uribe (eds). . Lisbon/Cologne: IELT/CCeH, University of Cologne 2017-2023. Version - A2.0.0-C2.0.0 + A3.0.0-C2.1.0 10.18716/cceh/pessoa Sepúlveda, Pedro, Ulrike Henny-Krahmer und Jorge Uribe (Hrsg). - . Lissabon/Köln: IELT/CCeH, 2017-2023. Version A2.0.0-C2.0.0 + . Lissabon/Köln: IELT/CCeH, 2017-2023. Version A3.0.0-C2.1.0 10.18716/cceh/pessoa @@ -914,20 +914,20 @@ Sepúlveda, Pedro, Ulrike Henny-Krahmer e Jorge Uribe (eds). . Lisboa e Colónia: IELT, Universidade Nova de Lisboa e CCeH, - Universidade de Colónia 2017-2023. Versão A2.0.0-C2.0.0 + Universidade de Colónia 2017-2023. Versão A3.0.0-C2.1.0 10.18716/cceh/pessoa Sepúlveda, Pedro, Ulrike Henny-Krahmer, and Jorge Uribe (eds). . Lisbon and Cologne: IELT, New University of Lisbon and CCeH, University - of Cologne 2017-2023. Version A2.0.0-C2.0.0 + of Cologne 2017-2023. Version A3.0.0-C2.1.0 10.18716/cceh/pessoa Sepúlveda, Pedro, Ulrike Henny-Krahmer und Jorge Uribe (Hrsg). . Lissabon und Köln: IELT, Neue Universität Lissabon und CCeH, - Universität zu Köln 2017-2023. Version A2.0.0-C2.0.0 + Universität zu Köln 2017-2023. Version A3.0.0-C2.1.0 10.18716/cceh/pessoa