Ignore:
Timestamp:
2023-01-20T00:22:40+13:00 (15 months ago)
Author:
davidb
Message:

Changes to support IIIF Manifest searching

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/document-iiif-manifest.xsl

    r37115 r37170  
    4646  <xsl:variable name="window-location-origin">https://intermuse.sowemustthink.space</xsl:variable>
    4747
    48    
    49   <xsl:variable name="iiifPresentationRootIdentifier">http-greenstone://<xsl:value-of select="$site_name"/>/<xsl:value-of select="$collNameChecked"/>/<xsl:value-of select="$docID"/></xsl:variable>
     48  <!-- optional cgi-params for links to document pages -->
     49  <xsl:variable name="opt-doc-link-args"></xsl:variable>
     50  <xsl:variable name="bookswitch"></xsl:variable>
     51 
     52  <xsl:variable name="iiifPresentationRootIdentifier">http://ld.greenstone.org/<xsl:value-of select="$site_name"/>/<xsl:value-of select="$collNameChecked"/>/<xsl:value-of select="$docID"/></xsl:variable>
    5053 
    5154  <xsl:template match="/">
     
    8992  <xsl:template name="iiif-other-content">
    9093    <xsl:param name="optSection"/>   
    91     <xsl:variable name="baseURL">https:<xsl:value-of select="/page/pageRequest/@baseURL"/></xsl:variable> <!-- **** had to hardwire https: -->   
    92     <xsl:if test="/page/pageResponse/format[@type='display']/gsf:option[@name='includeFileAssocOpenAnnotations']/@value='true'">
     94    <xsl:variable name="baseURL">https:<xsl:value-of select="/page/pageRequest/@baseURL"/></xsl:variable> <!-- **** had to hardwire https: -->
     95    <xsl:variable name="gsfOptionIncludeFileAssocOpenAnnotations"><xsl:value-of select="/page/pageResponse/format[@type='display']/gsf:option[@name='includeFileAssocOpenAnnotations']/@value"></xsl:value-of></xsl:variable>
     96    <xsl:variable name="cgiParamIncludeFileAssocOpenAnnotations"><xsl:value-of select="/page/pageRequest/paramList/param[@name='includeFileAssocOpenAnnotations']/@value"></xsl:value-of></xsl:variable>
     97    <xsl:if test="$gsfOptionIncludeFileAssocOpenAnnotations='true' or $cgiParamIncludeFileAssocOpenAnnotations='true'">
    9398             "otherContent": [{
    9499                    "@id": "<xsl:value-of select="$baseURL"/><xsl:value-of select="$library_name"/>/sites/<xsl:value-of select="$site_name"/>/collect/<xsl:value-of select="$collNameChecked"/>/index/assoc/<gsf:metadata name="assocfilepath" select="root"/>/openannotation-list<xsl:value-of select="$optSection"/>.json",
     
    212217    </xsl:variable>
    213218
     219    <xsl:variable name="toplevelSASShortID">
     220      <xsl:choose>
     221        <xsl:when test="@docType='simple'">
     222      <gsf:metadata name="SASShortID" />
     223    </xsl:when>
     224    <xsl:otherwise>
     225      <xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/document/documentNode/metadataList/metadata[@name='SASShortID']" />
     226    </xsl:otherwise>
     227      </xsl:choose>
     228    </xsl:variable>
     229
     230
    214231    <!-- start of iiif_manifest: -->
    215232    {
     
    225242          { "label": "title", "value": ["chosen-title"] }
    226243        ],
     244
     245        "service": {
     246          "profile": "http://iiif.io/api/search/0/search",
     247          "@id": "https://intermuse.sowemustthink.space/simpleAnnotationStore/search-api/<xsl:value-of select="$toplevelSASShortID"/>/search",
     248          "@context": "http://iiif.io/api/search/0/context.json"
     249    },
     250     
    227251        <!-- trival IIIF sequences => has one IIIF canvas in it -->
    228252        "sequences": [{
Note: See TracChangeset for help on using the changeset viewer.