Commit 52fcf7f9 authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

Merge branch 'ag/pluginsMetadata' into 'master'

ajout du niveau de description fonds

See merge request pdn-certic/MaX!106
parents bb0fcf6c 95f3377a
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -35,6 +35,11 @@
        </table>
    </xsl:template>

     <xsl:template match="div/ead:bibliography">
        <xsl:apply-templates />
     </xsl:template>

    
       <xsl:template match="div/ead:*//ead:*">
           <xsl:choose>
            <!-- on masque par défaut certaines balises, comme p-->
@@ -61,6 +66,10 @@
        </xsl:choose>
    </xsl:template>

     <xsl:template match="//ead:bibref">
        <xsl:apply-templates />
     </xsl:template>


     <xsl:template match="div/ead:controlaccess/ead:subject | div/ead:controlaccess/ead:geogname">
        <li class="{local-name(.)}">
@@ -126,4 +135,8 @@
    

   

 


</xsl:stylesheet>
 No newline at end of file
+18 −5
Original line number Diff line number Diff line
@@ -47,7 +47,6 @@ function max.plugin.metadata:getMetadataDocument($project, $doc, $tag, $search a
};

declare function max.plugin.metadata:getXMLByTag($project, $dbPath, $doc, $tag){
    
        switch ($tag)
        case "archdesc" return
            try{
@@ -63,6 +62,20 @@ declare function max.plugin.metadata:getXMLByTag($project, $dbPath, $doc, $tag){
                catch *{
                <div class='error'>{'Error [' || $err:code || '/' || $err:module || '/' || $err:line-number ||']: ' || $err:description}</div>
                }
         case "fonds" return
            try{
                
                    let $queryFonds := '<div>{doc("'||$dbPath || '/' || $doc ||'")/*:ead/*:archdesc/*:dsc/*:c/* except doc("'|| $dbPath || '/' || $doc ||'")/*:ead/*:archdesc/*:dsc/*:c/*:c}</div>'
                    return 
                    xquery:eval($queryFonds,map
                        {
                        'project':$project,
                        'locale': max.i18n:getLang($project)
                        })
                }
                catch *{
                <div class='error'>{'Error [' || $err:code || '/' || $err:module || '/' || $err:line-number ||']: ' || $err:description}</div>
                }
        default return
            try{
                    let $queryHeader := 'doc("'||$dbPath || '/' || $doc ||'")//*:ead/*:'|| $tag
+19 −0
Original line number Diff line number Diff line
<xsl:stylesheet version="2.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ead="urn:isbn:1-931666-22-9"
    xmlns:max="https://max.unicaen.fr" 
    exclude-result-prefixes="ead xsl max">

    <xsl:import href="../../ui/xsl/core/i18n.xsl"/>
    <xsl:param name="project"/>
    <xsl:param name="locale"/>

      <xsl:template match="node() | @*">
        <xsl:copy>
            <xsl:apply-templates select="@* | node()"/>
        </xsl:copy>
    </xsl:template>

 

</xsl:stylesheet>
 No newline at end of file