我只想从默认事件 portlet 中获取两位数的日期。在下面的示例中为“13”:
<dl class="portlet portletEvents">
<dt class="portletHeader"><a href="/mysite/events_listing">Next events</a></dt>
<dd class="portletItem">
<a title="" href="/mysite/events/my-event">Example event</a>
<span class="portletItemDetails"><span>13/04/2012 - 22/04/2012</span></span>
</dd>
<dd class="portletFooter"><a href="/mysite/events_listing">Next events…</a></dd>
</dl>
在根规则级别我尝试过:
<replace css:theme="#event-day strong">
<xsl:template css:match="dl.portletEvents .portletItemDetails span">
<xsl:value-of select="substring(.,1,2)" />
</xsl:template>
</replace>
并且:
<replace css:theme="#event-day strong">
<xsl:value-of css:select="substring(dl.portletEvents .portletItemDetails span,1,2)" />
</replace>
这些都没有奏效。我该怎么办?