xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] RE: XSL-List Digest V4 #623


Subject: [xsl] RE: XSL-List Digest V4 #623
From: Doug Howell <doug@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 Aug 2002 09:06:25 -0400

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



Current Thread
Keywords
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor