BetaMasaheft / Documentation

Die Schriftkultur des christlichen Äthiopiens: Eine multimediale Forschungsumgebung
3 stars 3 forks source link

Embed viewer for photos (OpenSeaDragon?) #2557

Open eu-genia opened 5 months ago

eu-genia commented 5 months ago

Currently photos when not mss are displayed only when link to a single image is provided e.g. INS0017UM has

<figure>
                        <graphic url="Sites/UM.tif">
                           <desc>The church photographed by Denis Nosnitsin during the Ethio-SPaRe project.</desc>
                        </graphic>
                     </figure>

resulting in image

Clearly this code cannot be used for a series of images as attempted in INS0478DS (@thea-m )

<figure>
                        <graphic url="Sites/INS0478DS/DS_" n="29">
                            <desc>
                                The church photographed by Denis Nosnitsin.
                            </desc>
                        </graphic>
                    </figure>

as figurecalls now for a single image, not for the viewer. The code results in HTTP ERROR 500 javax.servlet.ServletException: javax.servlet.ServletException: An error occurred while processing request to /exist/apps/BetMasWeb/institutions/INS0478DS/main: err:XPDY0002 Undefined context sequence for 'self::node()' [at line 1868, column 42, source: /db/apps/BetMasWeb/modules/viewItem.xqm] In function: viewItem:figure(element()) [4308:21:/db/apps/BetMasWeb/modules/viewItem.xqm] viewItem:TEI2HTML(item()*) [2402:18:/db/apps/BetMasWeb/modules/viewItem.xqm] viewItem:ab(element()) [4203:21:/db/apps/BetMasWeb/modules/viewItem.xqm] viewItem:TEI2HTML(item()*) [5559:18:/db/apps/BetMasWeb/modules/viewItem.xqm] viewItem:divofplacepath(item()*, item()*, item()*, item()*) [5282:18:/db/apps/BetMasWeb/modules/viewItem.xqm] viewItem:place(item()*) [5789:21:/db/apps/BetMasWeb/modules/viewItem.xqm] viewItem:main(item()*) [1431:9:/db/apps/BetMasWeb/modules/viewItem.xqm] item2:RestItem(item()*, item()*) [564:36:/db/apps/BetMasWeb/modules/item.xqm] restItem:ITEM(item()*, item()*, item()*, item()*, item()*, item()*, item()*, item()*, xs:string*) [87:1:/db/apps/BetMasWeb/restviews/items.xqm] restItem:getItemC(xs:string*, xs:string*, xs:string*, xs:string*, xs:string*, xs:string*, xs:string*, xs:string*) [-1:-1:/db/apps/BetMasWeb/restviews/items.xqm]

The previous release with XSLT did call for OpenSeaDragon in placeInstit.xsl <xsl:if test="//t:figure"><script type="text/javascript" src="resources/openseadragon/openseadragon.min.js"/></xsl:if>, the feature was taken into the release 5.2 as

if ($item//t:figure) then
            <script
                type="text/javascript"
                src="resources/openseadragon/openseadragon.min.js"/>
        else
            ()

yet this seems insufficient for multiple images

eu-genia commented 5 months ago

javascript for openseadragon must probably be edited and the code adjusted to allow for scrolling multiple images; before this is done only single images may be pointed to through figure