Re: Selecting a group of elements with different names
> I would like to define these object names in one > place and then reference them from numerous XPaths. If you actually want to select the same elements each time use a variable, <xsl;variabale name="x" select="/objects/object//(list|box|group)"/> ... select="$x" If you want to select elements with the same names, but in different contexts, you can use a function, for example <xsl:function name="my:f" as="xs:boolean"> <xsl:param name="e" as="element()"/> <xsl:sequence select="exists($e[self::list|self::box|self::group])"/> </xsl:function> ... select="/objects/object//*[my:f(.)]" David
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