Commit 3db3c405 authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

Fixes #74

parent ea4d930d
Loading
Loading
Loading
Loading
+120 −122
Original line number Diff line number Diff line
@@ -11,7 +11,6 @@
    <xsl:param name="second-prefix"/>



    <xsl:template match="align">
        <div id="text">
            <xsl:apply-templates/>
@@ -22,26 +21,16 @@
    </xsl:template>



    <xsl:template match="align//tei:div | align//div">        
    <xsl:template match="align//tei:div[@type] | align//div[@type]">
        <xsl:choose>
              <xsl:when test="@type='chapitre'">
                <xsl:apply-templates/>
              </xsl:when>
              <xsl:when test="@type='section'">
                <xsl:if test="starts-with(@xml:id,$first-prefix)">
                  <div class="section">
            <xsl:when test="starts-with(@xml:id,$first-prefix)">
                <div class="{@type}">
                    <xsl:apply-templates/>
                </div>
                </xsl:if>
            </xsl:when>
              <xsl:when test="@type='sous-section'">
                <xsl:if test="starts-with(@xml:id,$first-prefix)">
                <div class="sous-section">
            <xsl:otherwise>
                <xsl:apply-templates/>
                </div>
              </xsl:if>
              </xsl:when>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>

@@ -55,13 +44,17 @@
                <xsl:choose>
                    <xsl:when test="local-name(.)='head'">
                        <h2 class="align-left subpart">
                  <xsl:attribute name="id"><xsl:value-of select="@xml:id"/></xsl:attribute>
                            <xsl:attribute name="id">
                                <xsl:value-of select="@xml:id"/>
                            </xsl:attribute>
                            <xsl:apply-templates/>
                        </h2>
                    </xsl:when>
                    <xsl:otherwise>
                        <p class="align-left">
                  <xsl:attribute name="id"><xsl:value-of select="@xml:id"/></xsl:attribute>
                            <xsl:attribute name="id">
                                <xsl:value-of select="@xml:id"/>
                            </xsl:attribute>
                            <xsl:apply-templates/>
                        </p>
                    </xsl:otherwise>
@@ -111,8 +104,10 @@

        <a>
            <xsl:attribute name="class">note</xsl:attribute>
            <xsl:attribute name="id">appel<xsl:value-of select="$currentPrefix"/><xsl:value-of select="$numeroNote"/></xsl:attribute>
            <xsl:attribute name="href">#bdp<xsl:value-of select="$currentPrefix"/><xsl:value-of select="$numeroNote"/></xsl:attribute>
            <xsl:attribute name="id">appel<xsl:value-of select="$currentPrefix"/><xsl:value-of select="$numeroNote"/>
            </xsl:attribute>
            <xsl:attribute name="href">#bdp<xsl:value-of select="$currentPrefix"/><xsl:value-of select="$numeroNote"/>
            </xsl:attribute>
            <xsl:value-of select="$numeroNote"/>
        </a>
    </xsl:template>
@@ -150,8 +145,11 @@
            <p>
                <a>
                    <xsl:attribute name="class">note_to_text footnote</xsl:attribute>
                      <xsl:attribute name="name">bdp<xsl:value-of select="$prefix"/><xsl:value-of select="$numeroNote"/></xsl:attribute>
                      <xsl:attribute name="href"><xsl:value-of select="concat('#appel', $prefix, $numeroNote)"/></xsl:attribute>
                    <xsl:attribute name="name">bdp<xsl:value-of select="$prefix"/><xsl:value-of select="$numeroNote"/>
                    </xsl:attribute>
                    <xsl:attribute name="href">
                        <xsl:value-of select="concat('#appel', $prefix, $numeroNote)"/>
                    </xsl:attribute>
                    <xsl:value-of select="$numeroNote"/>
                </a>
                <xsl:apply-templates/>