Subject: unions, for-each, document order From: Steve Morrison <smorrison@xxxxxxx> Date: Wed, 02 Aug 2000 16:20:48 -0400 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Math functions, Jac Cowan | Thread | Re: unions, for-each, document orde, Steve Morrison |
Re: Unicode and emacs, Martin Stricker | Date | RE: MSXML version, Joshua Allen |
Month |