also showing <vz>-s, adding spaces for <vz> and <k> within kolokacija and...

, between (pod)pomen/oznaka
This commit is contained in:
Ozbolt Menegatti 2018-11-09 10:09:04 +01:00
parent 39786c3121
commit c128b20ca9

View File

@ -174,7 +174,7 @@
<xsl:param name="class-name"/> <xsl:param name="class-name"/>
<div> <div>
<span class="{$class-name}"> <span class="{$class-name}">
<xsl:apply-templates select="ks | p | i | k"/> <xsl:apply-templates select="ks | p | i | k | vz"/>
<div class="xslt-morelessbutton-div"> <div class="xslt-morelessbutton-div">
<a class="morelessbutton" href="javascript:void(null)"></a> <a class="morelessbutton" href="javascript:void(null)"></a>
</div> </div>
@ -195,13 +195,6 @@
<xsl:template match="zapis | korpusi | korpus | frek_lemma | opombe | struktura"/> <xsl:template match="zapis | korpusi | korpus | frek_lemma | opombe | struktura"/>
<!-- Tags to convert to insert space before -->
<xsl:template match="kolokacije//p | kolokacije//i">
<xsl:text xml:space="preserve"> </xsl:text>
<xsl:apply-templates/>
</xsl:template>
<!-- root tag, includes global script and tag --> <!-- root tag, includes global script and tag -->
<xsl:template match="clanek"> <xsl:template match="clanek">
@ -293,9 +286,16 @@
<xsl:text xml:space="preserve">) </xsl:text> <xsl:text xml:space="preserve">) </xsl:text>
</xsl:template> </xsl:template>
<xsl:template match="kolokacija//k[not(position()=last())] | r_kolokacija//r_k[not(position()=last())]"> <!-- divide k/r_k within (r_)kolokacija using , -->
<xsl:template match="ks/v | ks/v">
<xsl:text>,</xsl:text>
</xsl:template>
<!-- ' ' in front of k/vz for when <k> right after <i> or <vz> before <i> etc. -->
<xsl:template match="kolokacija//k | r_kolokacija//k | kolokacija//vz | r_kolokacija//vz">
<xsl:text> </xsl:text>
<xsl:apply-templates/> <xsl:apply-templates/>
<xsl:text xml:space="preserve">, </xsl:text> <xsl:text> </xsl:text>
</xsl:template> </xsl:template>
<xsl:template match="pomen/indikator | podpomen/indikator | indikator/oznaka"> <xsl:template match="pomen/indikator | podpomen/indikator | indikator/oznaka">
@ -309,6 +309,9 @@
<!-- oznaka outside of indikator mark differently --> <!-- oznaka outside of indikator mark differently -->
<xsl:template match="pomen/oznaka | podpomen/oznaka"> <xsl:template match="pomen/oznaka | podpomen/oznaka">
<span class="xslt-oznaka"><xsl:apply-templates/></span> <span class="xslt-oznaka"><xsl:apply-templates/></span>
<xsl:if test="position() != last()">
<xsl:text>, </xsl:text>
</xsl:if>
</xsl:template> </xsl:template>
<!-- Three simmilar rules --> <!-- Three simmilar rules -->