What I think you should be doing is sorting the <book> child nodes of
whatever
parent they have by title, something like:
<xsl:template match="insert-parent-of-book-here">
<xsl:apply-templates select="book">
<xsl:sort select="title"/>
</xsl:apply-templates>
</xsl:template>
Think of it as building a list of nodes to process using
<xsl:apply-templates
select="..."/>, and then sorting them using <xsl:sort/>
Actually, the XSL I'm using is this:
<xsl:template match="/">
<xsl:for-each select="/publisher/book[fld080[contains(fld080',
'Print-On-Demand')]]">
<xsl:sort select="title"/>
<xsl:call-template name="catalog_listing"/>
</xsl:for-each>
</xsl:template>
I simplified it a little to make it a less distracting post. Sorry. I
hope I haven't wasted anyone's time.
The XSL really does seem to work fine. From a file of 2270 books, it
comes up with 632 that match my for-each.
And the sorting really does look un-flawed for the majority of the 632.
Making it easy to overlook the oddballs among them.
Here's a little more of the problem with the "Effect*" titles,
in-context, in case that reveals anything useful that I'm not seeing...
Educating Mathematical Scientists: Doctoral Study and the Postdoctoral
Experience in the United States
Education and Delinquency: Summary of a Workshop
Education and Learning to Think
Education for Tomorrow's Jobs
Effective Manning of the U.S. Merchant Fleet
Effectiveness and Outcomes in Health Care: Proceedings of an
Invitational Conference
Effectiveness of the United States Advanced Battery Consortium as a
Government-Industry Partnership
Effective Services for Young Children: Report of a Workshop
Effect of Environment on Nutrient Requirements of Domestic Animals
The Effect of Genetic Variance on Nutritional Requirements of Animals:
Proceedings of a Symposium
Effects of Health Programs on Child Mortality in Sub-Saharan Africa
The Effects on Human Health of Subtherapeutic Use of Antimicrobials in
Animal Feeds
The Effects on the Atmosphere of a Major Nuclear Exchange
Eighteenth Symposium on Naval Hydrodynamics
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list