Moving similar rules together and removing one more.

This commit is contained in:
Ozbolt Menegatti 2018-10-31 12:23:32 +01:00
parent 2c70c47d5d
commit 3fb34db562

View File

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