You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the old hsg, page image views had a sidebar that provided a link to the possible document(s) that the page contains. For example, page 510 of frus1952-54v07p1 (visible at https://history.state.gov/historicaldocuments/frus1952-54v07p1/pg_510) contains the end of document 213 and the beginning of document 214. The sidebar:
The new site lacks this sidebar. The code we used to look up the possible documents belonging to a page number reference was:
declarefunctiondocs:sideright-documents($page) {
let $scope := $page//tei:div[@type='document']
let $sidebar :=
if ($scope) then
<div class="bordered resources">
<h3>Show full textof the document{if (count($scope) gt1) then's'else ()} on this page</h3>
<ul>{
for $div in $scope
let $xmlid := $div/@xml:id/string()
let $n := $div/@n/string()
orderby $xmlid
return
<li><a href="/{$docs:view-name}/{$volume}/{$xmlid}">Document {$n}</a></li>
}</ul>
</div>
else ()
return $sidebar
};
The calling function supplies the $page argument, containing a reconstructed fragment of the text between the two <pb> milestones:
let $this-page := $target (: the <pb> requested from the URL :)let $next-page := $this-page/following::tei:pb[1]
let $next-page-starts-document := $next-page/preceding-sibling::element()[1][self::tei:head] or (not($next-page/preceding-sibling::element()) and $next-page/parent::tei:div/@type = 'document')
let $fragment-ending-this-page :=
if ($next-page-starts-document) then
$next-page/parent::tei:divelse
$next-page
let $page :=
util:parse(util:get-fragment-between($this-page, $fragment-ending-this-page, true(), true()))
The text was updated successfully, but these errors were encountered:
The sidebar provides "buttons" to display the content between <pb xml:id="pg_510" n="510" facs="0544"/> and <pb xml:id="pg_511" n="511" facs="0545"/> etc. at the end of the page, under the image.
It's unclear to me, because I can't see a working example anymore.
By the way, what does $docs:view-name in the <a> tag stand for in your code example?
On the old hsg, page image views had a sidebar that provided a link to the possible document(s) that the page contains. For example, page 510 of frus1952-54v07p1 (visible at https://history.state.gov/historicaldocuments/frus1952-54v07p1/pg_510) contains the end of document 213 and the beginning of document 214. The sidebar:
The new site lacks this sidebar. The code we used to look up the possible documents belonging to a page number reference was:
The calling function supplies the
$page
argument, containing a reconstructed fragment of the text between the two<pb>
milestones:The text was updated successfully, but these errors were encountered: