Commit c1a4c2f0 authored by Eva Huet's avatar Eva Huet
Browse files

JATS : ajout translittération et fix traitement global de la linguistique

parent 7f6a5be4
Loading
Loading
Loading
Loading
+12 −21
Changes for xsl/jats/jats2html.xsl: 12 added lines, 21 removed lines.
Original line number Diff line number Diff line
@@ -1718,32 +1718,25 @@

 <!--linguistique-->

    <xsl:template match="disp-quote[child::p[@specific-use='linguistic']]">
    <xsl:template match="disp-quote[@content-type='linguistic']">
        <table class="linguistic">
            <tbody>
                <xsl:if test="child::named-content[@content-type='label']">
                <xsl:if test="label or title">
                    <tr>
                        <td>
                            <xsl:apply-templates select="child::named-content[@content-type='label']/node()"/>   
                            <xsl:apply-templates select="label/node()"/><xsl:text> </xsl:text><xsl:apply-templates select="title/node()"/>
                        </td>
                    </tr>                 
                </xsl:if>
                <xsl:if test="p[@specific-use='linguistic']/named-content[@content-type='label']">
                    <tr>
                        <td>
                            <xsl:apply-templates select="p[@specific-use='linguistic']/named-content[@content-type='label']/node()"/> 
                        </td>
                    </tr>
                </xsl:if>
                <xsl:for-each select="child::p[@specific-use='linguistic']/*">
                <xsl:for-each select="child::p">
                    <tr>
                        <xsl:apply-templates select="."/>
                    </tr>
                </xsl:for-each>
                <xsl:for-each select="child::attrib/*">
                <xsl:for-each select="child::attrib">
                    <tr>
                        <td>
                            <xsl:apply-templates select="child::attrib/node()"/>
                            <xsl:apply-templates select="node()"/>
                        </td>
                    </tr>
                </xsl:for-each>
@@ -1756,7 +1749,7 @@
    <xsl:template match="named-content[@content-type='seg']">
        <xsl:choose>
            <xsl:when
                    test="not(preceding-sibling::named-content[@content-type='seg'] or following-sibling::named-content[@content-type='seg']) and parent::p[@specific-use='example']">
                    test="not(preceding-sibling::named-content[@content-type='seg'] or following-sibling::named-content[@content-type='seg'])">
                <xsl:apply-templates/>
            </xsl:when>
            <xsl:otherwise>
@@ -1781,11 +1774,9 @@
        </td>
    </xsl:template>-->

    <xsl:template match="named-content[@content-type='example'] 
                        | named-content[@content-type='gloss'] 
                        | named-content[@content-type='trl']">
    <xsl:template match="disp-quote[@content-type='linguistic']/p" priority="1">
        <xsl:variable name="maxCount">
            <xsl:for-each select="p[@specific-use='example']">
            <xsl:for-each select="../p[@content-type='example']">
                <xsl:sort select="count(*)" data-type="number" order="descending"/>
                <xsl:if test="position() = 1">
                    <xsl:value-of select="count(*)"/>
@@ -1796,9 +1787,9 @@
            <xsl:value-of select="count(child::named-content[@content-type='seg'])"/>
        </xsl:variable>
        <xsl:choose>
            <xsl:when test="@content-type='trl'"> 
            <xsl:when test="@content-type='trl' or @content-type='transliteration'"> 
                <td>
                    <xsl:attribute name="number-columns-spanned">
                    <xsl:attribute name="colspan">
                        <xsl:value-of select="$maxCount"/>
                    </xsl:attribute>
                    <xsl:apply-templates/>
@@ -1814,7 +1805,7 @@
            </xsl:when>-->
            <xsl:when test="$nbSeg='1'">
                <td>
                    <xsl:attribute name="number-columns-spanned">
                    <xsl:attribute name="colspan">
                        <xsl:value-of select="$maxCount"/>
                    </xsl:attribute>
                    <xsl:apply-templates/>