Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 6th, 2007, 11:55 AM
TPP TPP is offline
Authorized User
Join Date: Mar 2006
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default "multiconditional" for-each ??

I need a nested for-each but the "inner-one" refers to a node whose name can come in 2 in xsd defined names (example "name" and "eman").

Is it possible to do a for-each for 2 differently named nodes??
At there is a 500lines and i would not like copypaste it if its not necessary.


<xsl:for-each select="//root/element">
<xsl:for-each select="name or eman">



Old March 6th, 2007, 12:27 PM
mhkay's Avatar
Wrox Author
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts

Sure, use the union operator "|" that is


Michael Kay
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.