| | </xsl:template> |
| | |
| | -<xsl:template match="directions[1]"> |
| | - <xsl:text>\startinstructions

</xsl:text> |
| | -</xsl:template> |
| | - |
| | -<xsl:template match="directions[descendant::text()]"> |
| | +<xsl:template match="directions[descendant::text() or @label != '']"> |
| | + <xsl:if test="not(preceding-sibling::directions)"> |
| | + <xsl:text>\startinstructions

</xsl:text> |
| | + </xsl:if> |
| | <xsl:text>\begin{instructions}
</xsl:text> |
| | <xsl:apply-templates select="@label" /> |
| | <xsl:apply-templates select="step" /> |
| | + <xsl:if test="not(step)"> |
| | + <xsl:text>\item Serve!</xsl:text> |
| | + </xsl:if> |
| | <xsl:text>\end{instructions}

</xsl:text> |
| | </xsl:template> |