papyri / navigator

Code for the Papyrological Navigator
http://papyri.info
Other
7 stars 7 forks source link

Biblio `<relatedItem type="mentions">` and DCLP #164

Open samosafuz opened 4 months ago

samosafuz commented 4 months ago

XML in the biblio collection is capable of cross-referencing the particular text(s) in PN to which it pertains. This is obviously a handy way of connecting files in biblio with those in ddb or dclp. So, for example, in biblio/40758.xml#L30-L45, one finds the following sequence of code:

<relatedItem type="mentions" n="1">
  <bibl>
    <title level="s" type="short">P. Mil. Vogl.</title>
    <biblScope type="vol">II</biblScope>
    <biblScope type="num">43</biblScope>
    <idno type="dclp">63128</idno>
  </bibl>
</relatedItem>
<relatedItem type="mentions" n="2">
  <bibl>
    <title level="s" type="short">P. Mil. Vogl.</title>
    <biblScope type="vol">III</biblScope>
    <biblScope type="num">129</biblScope>
    <idno type="ddb">p.mil.vogl;3;129</idno>
  </bibl>
</relatedItem>

It is transformed for display in PN as follows – as the first two items under 'Mentioned Texts':

Screenshot 2024-04-30 at 4 08 46 PM

As you can see, the second item (<idno type="ddb">p.mil.vogl;3;129</idno>) is clickable, and redirects to the page for that papyrus: papyri.info/ddbdp/p.mil.vogl;3;129. When the XSLT was produced, it evidently had interaction with ddb specifically in mind.

But the same is not true for the first item (<idno type="dclp">63128</idno>), which belongs to dclp. It would be nice to update the XSLT such that clicking on such an item redirects to the appropriate page in dclp (i.e., papyri.info/dclp/63128). Because the structure of dclp metadata already refers to files in the biblio collection, it should be possible to synchronize (for lack of a better term), so that biblio also redirect to their counterparts in dclp.

(This issue is perhaps somewhat tangentially related to https://github.com/papyri/navigator/issues/81.)

hcayless commented 4 months ago

Note to self: the culprit is in here: https://github.com/papyri/navigator/blob/master/pn-xslt/htm-teibibl.xsl#L252-L293, which was set up only to account for Ddb-type idnos and needs to be extended to DCLP.