[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: for-each-group for multiple nodes
On 17 Jul 2009, at 03:36 , Ramkumar wrote:
...
<xsl:for-each-group select="*" group-starting-with="para"/> I think that since you want each LevelF para to generate a distinct qandaset element in the output, you might think about whether you really want a distinct group for every para, or just a distinct group for every sequence of elements beginning with para aid:pstyle="LevelF". <xsl:choose> <xsl:when test="self::para/@aid:pstyle[contains(.,'LevelF')]"> <qandaset> <xsl:call-template name="g"> <xsl:with-param name="e" select="current-group()"/> </xsl:call-template> </qandaset> </xsl:when>
As a first step, try to get the outermost grouping to work; don't worry about the inner groupings. Since you want each LevelF paragraph to produce an element containing its following siblings up to but not including the next level F paragraph, you want a grouping based on the LevelF value, not on the string 'Level'. Within those groups, you may want to make use of recursive groupings for Level M. I hope this helps; if it does not help sufficiently, please ask again. Michael Sperberg-McQueen -- **************************************************************** * C. M. Sperberg-McQueen, Black Mesa Technologies LLC * http://www.blackmesatech.com * http://cmsmcq.com/mib * http://balisage.net ****************************************************************
|
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
|