Moving similar rules together and removing one more.

master
Ozbolt Menegatti 6 years ago
parent 2c70c47d5d
commit 3fb34db562

@ -71,6 +71,18 @@
Here are all of xslt rules
Please dont polute xslt with it
******************************** -->
<!-- Tags to skip -->
<xsl:template match="zapis | korpusi | korpus | frek_lemma | opombe |
pomenska_shema | definicija1 | definicija2 | struktura"/>
<!-- Tags to convert to insert space before -->
<xsl:template match="zgled//* | kolokacije//p | kolokacije//i">
<xsl:text xml:space="preserve"> </xsl:text>
<xsl:apply-templates/>
</xsl:template>
<!-- root tag, includes global script and tag -->
@ -103,19 +115,9 @@
<xsl:apply-templates/>
</span>
<xsl:text xml:space="preserve"> </xsl:text>
</xsl:template>
<xsl:template match="oblika"><xsl:apply-templates/></xsl:template>
<xsl:template match="zaglavje"><xsl:apply-templates/></xsl:template>
<xsl:template match="zapis"/>
<xsl:template match="korpusi"/>
<xsl:template match="korpus"/>
<xsl:template match="frek_lema"/>
<xsl:template match="opombe"/>
</xsl:template>
<!-- END of HEAD (glava), go to BODY (geslo) -->
<xsl:template match="geslo"><xsl:apply-templates/></xsl:template>
<xsl:template match="pomen">
<div class="xslt-pomen-top">
@ -167,11 +169,6 @@
<xsl:text xml:space="preserve"> </xsl:text>
</xsl:template>
<xsl:template match="kolokacije//p | kolokacije//i">
<xsl:text xml:space="preserve"> </xsl:text>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="kolokacije//ks">
<xsl:text xml:space="preserve"> (</xsl:text>
<xsl:apply-templates/>
@ -191,36 +188,21 @@
<xsl:text xml:space="preserve"> </xsl:text>
</xsl:template>
<xsl:template match="pomenska_shema"/>
<xsl:template match="definicija1"/>
<xsl:template match="definicija2"/>
<xsl:template match="struktura"/>
<xsl:template match="zgledi">
<div style="margin: 0.5em 0;">
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="zgled[not(parent::vecjez)]">
<xsl:template match="zgled">
<div>
<div style="float: left; margin-left: 0.5em; color: #999999; font-weight: bold;">
<div style="float: left; margin-left: 0.5em; color: #999999;">
»
</div>
<div style="margin-left: 2em;">
<span style="color: #666666; font-weight: bold;">
<xsl:apply-templates/>
</span>
<div style="margin-left: 2em; color: #666666; font-weight: bold;">
<xsl:apply-templates/>
</div>
<div style="clear: left;"></div>
</div>
</xsl:template>
<xsl:template match="zgled//*">
<xsl:text xml:space="preserve"> </xsl:text>
<xsl:apply-templates/>
<xsl:text xml:space="preserve"> </xsl:text>
</xsl:template>
</xsl:template>
</xsl:stylesheet>

Loading…
Cancel
Save