Commit 15c910d0 authored by Marie Bisson's avatar Marie Bisson
Browse files

proposition document toc pour ead

parent 877b7637
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ declare function local:buildEADDocumentTOC($projectId, $docPath){
                        <summary>
                        <a href="{$baseURI}{$projectId}/{$docPath}/{$c/@id}.html">
                            {$c/@id}
                            {$c/*:did/*:unittitle[1]//text()}
                            {$c/*:did/node()}
                            </a>
                        </summary>
                        {local:childrenToc($c, $projectId, $docPath)}
@@ -39,9 +39,9 @@ declare function local:childrenToc($component, $projectId, $docPath){
            <summary>
                <a href="{$baseURI}{$projectId}/{$docPath}/{$c/@id}.html">
                    {$c/@id}
                    {$c/*:did/*:unitid[1]//text()}
                    {$c/*:did/node()}
                    
                    {$c/*:did/*:unittitle[1]//text()}
                    {$c/*:did/node()}
                </a>
            </summary>
            {local:childrenToc($c, $projectId, $docPath)}
+76 −0
Original line number Diff line number Diff line
<xsl:stylesheet version="2.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:ns="urn:isbn:1-931666-22-9"
    xmlns:ead="urn:isbn:1-931666-22-9" exclude-result-prefixes="ead ns xlink">

    <xsl:template match="/">
        <!-- <xsl:copy-of select="."/> -->
        <xsl:apply-templates/>
    </xsl:template>
    <xsl:template match="*:origination"/>
    <xsl:template match="*:physdesc"/>
    <xsl:template match="*:repository"/>
    <xsl:template match="*:langmaterial"/>
    <xsl:template match="*:unitid[@type='Cote_ancienne']"/>
    <xsl:template match="*:note"/>
    <xsl:template match="*:imprint"/>
    <xsl:template match="*:dao"/>
    <xsl:template match="nav">
        <nav>
            <xsl:apply-templates/>
        </nav>
    </xsl:template>
    <xsl:template match="details">
        <xsl:choose>
            <xsl:when test="details">
                <details id="{@id}">
                    <xsl:apply-templates/>
                </details>
            </xsl:when>
            <xsl:otherwise>
                <details open="">
                <xsl:apply-templates/>
                </details>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    <xsl:template match="summary">
        <summary>
            <xsl:apply-templates/>
        </summary>
    </xsl:template>
    <xsl:template match="a">
        <a href="{@href}">
            <xsl:apply-templates/>
        </a>
    </xsl:template>

    <xsl:template match="*:emph">
        <span class="{@render}">
            <xsl:apply-templates/>
        </span>
    </xsl:template>
    <xsl:template match="*:unittitle">
        <span class="unittitle">
            <xsl:apply-templates/>
        </span>
    </xsl:template>
    <xsl:template match="*:unitid">
        <span class="unitid">
            <xsl:apply-templates/>
            <xsl:text></xsl:text>
        </span>
    </xsl:template>
    <xsl:template match="*:persname">
        <span class="persname">
            <xsl:apply-templates/>
            <xsl:text>, </xsl:text>
        </span>
    </xsl:template>
    <xsl:template match="*:title">
        <span class="title">
            <xsl:apply-templates/>            
        </span>
    </xsl:template>
</xsl:stylesheet>
 No newline at end of file