Commit 1c35ee05 authored by Jérôme Chauveau's avatar Jérôme Chauveau
Browse files

suppression test ead|tei pour titre des documents : xquery fichier...

suppression test ead|tei pour titre des documents : xquery fichier rxq/<xmlformat>/document_title.xq
parent ee3b386a
Loading
Loading
Loading
Loading
+1 −1
Changes for max.xq: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ declare
%output:method("html")
%output:html-version("5.0")
%output:encoding("UTF-8")
%rest:path( "/{$project}.html")
%rest:path( "/{$project}")
function max:projectHome($project){
    let $redirection :=
    if(ends-with(request:uri(),'/'))
+3
Changes for rxq/cons.xqm: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -32,6 +32,9 @@ declare variable $max.cons:TOC_QUERY_FILEPATH := "xq/toc.xq";
(: document toc query :)
declare variable $max.cons:DOCUMENT_TOC_QUERY_FILENAME := "document_toc.xq";

(: document title query :)
declare variable $max.cons:DOCUMENT_TITLE_QUERY_FILENAME := "document_title.xq";

(: document toc query :)
declare variable $max.cons:DOCUMENT_TOC_QUERY_FILEPATH := "xq/"||$max.cons:DOCUMENT_TOC_QUERY_FILENAME;

+7
Changes for rxq/ead/document_title.xq: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
xquery version "3.0";

declare variable $documentPath external;

let $title := doc($documentPath)/*:ead/*:archdesc/*:did/*:unittitle//text()
return <span><title>{$title}</title></span>
−33
Changes for rxq/ead/document_toc.xq: 0 added lines, 33 removed lines.
Original line number Diff line number Diff line
@@ -26,39 +26,6 @@ declare function local:buildEADDocumentTOC($projectId, $docPath){
        </nav>
};


(:declare function local:getComponentChildren($component, $projectId, $docPath){:)
(:    for $c in $component/*:dsc/*:c:)
(:    return:)
(:        <details  id="details_{$c/@id}">:)
(:            <summary>:)
(:                <a href="{$baseURI}{$projectId}/{$docPath}/{$c/@id}.html">:)
(:                    {$c/@id}:)
(:                    {$c/*:did/*:unitid[1]//text()}:)
(:                    –:)
(:                    {$c/*:did/*:unittitle[1]//text()}:)
(:                </a>:)
(:            </summary>:)
(:            {local:childrenToc($c, $projectId, $docPath)}:)
(:        </details>:)
(:};:)

(:declare function local:getComponentGrandChildren($component, $projectId, $docPath){:)
(:    for $c in $component/*:c:)
(:    return:)
(:        <details  id="details_{$c/@id}">:)
(:            <summary>:)
(:                <a href="{$baseURI}{$projectId}/{$docPath}/{$c/@id}">:)
(:                    {$c/@id}:)
(:                    {$c/*:did/*:unitid[1]//text()}:)
(:                    –:)
(:                    {$c/*:did/*:unittitle[1]//text()}:)
(:                </a>:)
(:            </summary>:)
(:            {local:getComponentGrandChildren($c, $projectId, $docPath)}:)
(:        </details>:)
(:};:)

declare function local:childrenToc($component, $projectId, $docPath){
    for $c in $component/*
    return
+11
Changes for rxq/tei/document_title.xq: 11 added lines, 0 removed lines.
Original line number Diff line number Diff line
xquery version "3.0";
declare namespace tei="http://www.tei-c.org/ns/1.0";
declare variable $documentPath external;


if(doc($documentPath)/tei:teiCorpus)
then
    doc($documentPath)/tei:teiCorpus/tei:teiHeader/tei:fileDesc/tei:titleStmt
else
    doc($documentPath)/tei:TEI/tei:teiHeader/tei:fileDesc/tei:titleStmt
Loading