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"/>
<div>
<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">
<a class="morelessbutton" href="javascript:void(null)"></a>
</div>
@ -194,13 +194,6 @@
<!-- Tags to skip -->
<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 -->
@ -292,12 +285,19 @@
<xsl:apply-templates/>
<xsl:text xml:space="preserve">) </xsl:text>
</xsl:template>
<xsl:template match="kolokacija//k[not(position()=last())] | r_kolokacija//r_k[not(position()=last())]">
<xsl:apply-templates/>
<xsl:text xml:space="preserve">, </xsl:text>
<!-- 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:text> </xsl:text>
</xsl:template>
<xsl:template match="pomen/indikator | podpomen/indikator | indikator/oznaka">
<xsl:text xml:space="preserve"> </xsl:text>
<span class="xslt-indicator">
@ -309,6 +309,9 @@
<!-- oznaka outside of indikator mark differently -->
<xsl:template match="pomen/oznaka | podpomen/oznaka">
<span class="xslt-oznaka"><xsl:apply-templates/></span>
<xsl:if test="position() != last()">
<xsl:text>, </xsl:text>
</xsl:if>
</xsl:template>
<!-- Three simmilar rules -->