[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] unions, for-each, document order
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
|
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
|