xsl-list
[Top] [All Lists]

Re: [xsl] for-each-group not working

2008-11-24 06:36:13
I am using saxon9 for xml transformation. In this, for-each-group not
working fine. So please anyone find my errors.

:)

My HTML (input),
<html>
<body>
<p class="indexmain"><em>Slogan main</em> 158</p>
<p class="indexsecond"><em>Slogan</em> 158</p>
<p class="indexsecond"><em>Slogan</em> 158</p>
<p class="indexsecond"><em>Slogan</em> 158</p>
<p class="indexsecond"><em>Slogan</em> 158</p>
<p class="indexmain"><em>Slogan main</em> 158</p>
<p class="indexsecond"><em>Slogan</em> 158</p>
<p class="indexsecond"><em>Slogan</em> 158</p>
<p class="indexsecond"><em>Slogan</em> 158</p>
<p class="indexmain"><em>Slogan main</em> 158</p>
</body>
</html>


<xsl:for-each-group select="*" 
group-starting-with="p[contains(@class,'index')]">

You have:

group-starting-with="p[contains(@class,'index')]"

but that's true for all of them, so I think you meant:

group-starting-with="p[contains(@class,'indexmain')]"




-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--