[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: following-sibling problem
On Oct 27, 2004, at 9:38 AM, Michael Kay wrote:
For a very similar problem I used: I'm a little stuck on this; I end up sending Saxon into an infinite loop with my current code: <xsl:template match="key:slide"> <div class="slide"> <xsl:apply-templates select="key:bullets"/> </div> </xsl:template> <xsl:template match="key:bullets"> <xsl:choose> <xsl:when test="../@master-slide-id='master-slide-1'"> <xsl:apply-templates select="key:bullet[@level='0']" mode="title"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="process-level"> <xsl:with-param name="bullet" select="key:bullet"/> <xsl:with-param name="level" select="0"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="key:bullet[@level='0']" mode="title"> <h1><xsl:value-of select="$title"/></h1> <h3><xsl:value-of select="$author"/></h3> </xsl:template> <xsl:template name="process-level"> <xsl:param name="bullet" required="yes" as="element()*"/> <xsl:param name="level" required="yes" as="xs:integer"/> <xsl:for-each-group select="$bullet" group-starting-with="*[xs:integer(@level) eq $level]"> <ul> <li><xsl:value-of select="normalize-space(.)"/></li> <xsl:call-template name="process-level"> <xsl:with-param name="bullet" select="current-group() except ..."/> <xsl:with-param name="level" select="$level + 1"/> </xsl:call-template> </ul> </xsl:for-each-group> </xsl:template>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|