xsl-list
[Top] [All Lists]

RE: [xsl] Sorting and Grouping Alphabetically: Two Levels

2008-01-08 10:28:48
 
blugh which processor are you using?
.NET XSL processor (xsl 1) supplied with Visual Studio.NET 2003. It's
sad, I know...

the structure of the xslt for text is (or can be) very different.
Consider just one step of your problem adding a blank line between
letters (assuming sorting is done.

If you are just generating text, you don't need to group anything, you
just need to put out a blank line every now and then

<xsl:for-each seelct="*">
<xsl:value-of select="."/>
<xsl:if
tests="not(substring(.,1,1)=substring(following-sibling::*[1],1,1))">&#1
0;</xsl:if>
</xsl:for-each>

this is actually what i was doing, EXCEPT the problem I was/am having is
that "following-sibling" ignores the sort imposed by xsl:sort. Which is
exactly how I ended up down the xsl:key path. I thought by organizing
the data with keys, I could trick the xsl into finding the post-sort
following-sibling. Isn't that the case?

Trish

--~------------------------------------------------------------------
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>
--~--