Right now when i'm setting publishing restrictions for items in Sitecore that get rendered by xslt renderings, the xslt will just output empty blocks which don't look very nice on the website.
This is the xslt code i'm using to render my Sitecore item:
<xsl:for-each select="$item[sc:fld('__created',.)]">
<xsl:for-each select="sc:Split('Agenda-items',$item)">
<xsl:variable name="thisitem" select="sc:Split('Agenda-items',$item)" />
<xsl:variable name="loopitem" select="sc:item(text(),.)" />
<xsl:if test="$item[sc:fld('__created',.)]">
<div class="agendaItem">
<div class="agendaDatum">
<span class="agendaDag">
<sc:date field="Begindatum" format="dd" select="$loopitem" />
</span>
<span class="agendaMaand">
<sc:date field="Begindatum" format="MMM" select="$loopitem" />
</span>
</div>
<div class="agendaTekst">
<sc:link select="$loopitem" title="" class="rood">
<sc:text field="Titel" select="$loopitem" />
</sc:link>
<br />
<span class="agendaUitleg">
<xsl:value-of select="stringutil:Clip(sc:field('Intro',$loopitem), 60, 1)"/> 
</span>
</div>
</div>
</xsl:if>
</xsl:for-each>
</xsl:for-each>
What i want is to check wheter an item has a version available in the context language that is NOT restricted from being shown on the current date. So for example:
It's 12 february 2010 and i have an item which is restricted from publishing from 11 february 2010 untill 16 february 2010. Right now it will not be shown, which is what i want. But instead of not Showing my spans and div's either, it will just fill them with empty info. This results in empty blocks on the website which is kind of ugly:
So the top one item of this block shows an item, while it's restricted from being published. How can i handly this in xslt??
The Sitecore presentation xslt cookbook says:
<xsl:for-each select="$sc_currentitem/item[sc:fld('__created',.)]">
<!--the context element is an item with a version in the context language-->
</xsl:for-each>
This is to select items with a version in the context language, but isn't working for what I want.