Uniting pomen/podpomen logic within single template
This commit is contained in:
parent
3fb34db562
commit
bf91f9dbd9
34
view.xsl
34
view.xsl
|
@ -65,7 +65,21 @@
|
|||
}
|
||||
|
||||
</style>
|
||||
</xsl:variable>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- ********************************
|
||||
Pomen/podpomen logic
|
||||
******************************** -->
|
||||
|
||||
<xsl:template name="pomen_podpomen_logic">
|
||||
<xsl:apply-templates select="indikator | oznaka | pomenska_shema"/>
|
||||
<div style="padding: 0.5em 0;">
|
||||
<a class="morelessbutton" href="javascript:void(null)">▼ more</a>
|
||||
</div>
|
||||
<div class="hideable" style="display: none">
|
||||
<xsl:apply-templates select="skladenjske_skupine"/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<!-- ********************************
|
||||
Here are all of xslt rules
|
||||
|
@ -125,20 +139,8 @@
|
|||
<xsl:number />
|
||||
</div>
|
||||
<div style="margin-left: 2em;">
|
||||
<xsl:apply-templates select="podpomen | indikator | oznaka | pomenska_shema"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(../pomen)>1 and skladenjske_skupine//text()">
|
||||
<div style="padding: 0.5em 0;">
|
||||
<a class="morelessbutton" href="javascript:void(null)">▼ more</a>
|
||||
</div>
|
||||
<div class="hideable" style="display: none">
|
||||
<xsl:apply-templates select="skladenjske_skupine"/>
|
||||
</div>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates select="skladenjske_skupine"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:call-template name="pomen_podpomen_logic"/>
|
||||
<xsl:apply-templates select="podpomen"/>
|
||||
</div>
|
||||
<div style="clear: left;"></div>
|
||||
</div>
|
||||
|
@ -151,7 +153,7 @@
|
|||
|
||||
<div style="margin-bottom: 0.5em;">
|
||||
<xsl:value-of select="$pomenNum"/>.<xsl:number/>
|
||||
<xsl:apply-templates/>
|
||||
<xsl:call-template name="pomen_podpomen_logic"/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user