1) I need to match an element A provided it is one of the first three children of element Z. Alternatively, I could just match A and then conditionally process it within the template rule. 2) I need to match element B provided all its preceding siblings are any or all of elements W, X, or Y. Again, I could use xsl:if statements to apply the conditional logic. I can't seem to wrap my head around how to do these things. It should be so obvious and yet.... Can anybody help? TIA....
* larrysulky@gmail.com wrote in microsoft.public.xsl: >1) I need to match an element A provided it is one of the first three >children of element Z. Alternatively, I could just match A and then >conditionally process it within the template rule. That's A[parent::Z and count(preceding-sibling::*) <= 3]. >2) I need to match element B provided all its preceding siblings are >any or all of elements W, X, or Y. Again, I could use xsl:if >statements to apply the conditional logic. B[not(preceding-sibling::*[ ... check names here ... ])]. -- Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de 68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
Thank you, Björn!