Commit 6d9f8702 authored by Anne Goloubkoff-Duponchel's avatar Anne Goloubkoff-Duponchel
Browse files

nettoyage

parent ce28cb39
Loading
Loading
Loading
Loading
+2 −15
Original line number Diff line number Diff line
@@ -56,20 +56,7 @@ return if (file:exists($indexFilePath)) then max.plugin.index:index($project,$ty

declare function max.plugin.index:loadIndex($edition,$type,$xq,$xsl,$lang) {
  let $dbPath := max.config:getProjectDBPath($edition)
  let $projectIndex := if($type='typesdocs')
                       then <index type="typesdocs">{
                         for $idx in collection($dbPath)//*:controlaccess/*:genreform
                         order by $idx/text()
                         let $cId := $idx/ancestor::*:c[1]/@id
                         let $cOtherlevel := $idx/ancestor::*:c[1]/@otherlevel
                         let $cUnitid := $idx/ancestor::*:c[1]/descendant::*:unitid[1]/text()
                         let $result := <marker id="{$cId}" otherlevel="{$cOtherlevel}"><entry>{$cUnitid}</entry><value>{$idx/text()}</value></marker>
                         return $result}</index>
                       else xquery:eval(xs:anyURI($xq)) 

  let $HTMLProjectIndex := if($type='typesdocs')
                             then xslt:transform($projectIndex, 'indexing.xsl', ())
                           else xslt:transform($projectIndex, $xsl, ( map {'project' : $edition, 'locale' : $lang})) 

  let $projectIndex := xquery:eval(xs:anyURI($xq)) 
  let $HTMLProjectIndex := xslt:transform($projectIndex, $xsl, ( map {'project' : $edition, 'locale' : $lang})) 
  return $HTMLProjectIndex
};