[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

unions, for-each, document order

Subject: unions, for-each, document order
From: Steve Morrison <smorrison@xxxxxxx>
Date: Wed, 02 Aug 2000 16:20:48 -0400
steve morrison
So, I have a set of nodes each called <cat>. The <cat> tag has an attribute called level, which is either 0 or 1. The <cat>s come in alphabetical order, and ones with level="1" or level="0" can occur at any point. I need to process these in such a way that it applies a template to the level="1"'s first, then the level="0"'s. I then do another round of suppression/selection based on some other attributes.

This would do exactly what I want:
<xsl:for-each select="cat[@level = 1] | cat[@level = 0]">
  <xsl:if test="sometest based on parent nodes">
    <!-- create html -->
  </xsl:if>
</xsl:for-each>
except, the for-each and apply-templates goes in document order, as opposed to copy-of, which applies the union in the order I specify in the select! Is there another way around this? I tried using two different for-each loops, but, then that messes up my inner <xsl:if> test.

Thanks,
-Steve


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.