First ancestor with a specific attribute
Hi, I'm having a blonde moment here and I don't use xslt everyday. I'm simply trying to get the first ancestor of a node that contains a specific attribute. My attempt: select="ancestor::node()[@name!=null]/@name" Desired effect: return the first ancestor that has a 'name' element. My bit of xpath returns nothing, even if some of the ancestor nodes contain a 'name' attribute. Best, Jacobus
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