|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XSL-List Digest V4 #623
Doug wrote:
>>
I tried this:
<xsl:for-each select="//term|//acronym">
<xsl:sort select="." order="ascending"/>
<p><xsl:value-of select="."/>:</p>
</xsl:for-each>
This lists the terms and acronyms together, but doesn't sort them (they come
out in document order). I think I've read that the union operator can only
deliver the selected nodes in document order.
>>
Jeff wrote:
>>
Here was the output:
<p>A acronym:</p>
<p>A term:</p>
<p>B acronym:</p>
<p>B term:</p>
<p>C acronym:</p>
<p>C term:</p>
Is that not what you wanted? If so, then maybe your problem is elsewhere in
your stylesheet.
<<
Thanks, Jeff. I'd like to just slink away and pretend this didn't happen,
but I guess I'd better confess, so you all know that, indeed, I did get this
code to work after all. After Jeff told me that it worked for him, I started
looking around for what else could be wrong, and guess what? The XML and XSL
files were being loaded dynamically via an HTML page, and I had forgotten
that there was a function being called in the <body> tag which reset the
sort select attribute to "term." So no matter what I tried in the stylesheet
itself, it always got changed back to "term." My left hand did let my right
hand know what it was doing, but it was so long ago that it forgot. At least
I can say it's Friday. 'Course, it wasn't Friday yesterday when this
happened. Oh, well, Friday came early this week. Thanks again, Jeff!
Doug
Doug Howell
Information Architect
Borders Group Inc.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








