[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: What's wrong with my ancestor syntax?
<xsl:for-each select="*/menuItem[ancestor-or-self::pageID = $pageID]"> that selects menuItem's that have an ancestor, or are a pageID element with the supplied value, but clearly a menuItem is never a pageID and looking at your input I don't think it ever as pageID has ancestor. I think you want to know if the current eleemnt or ancestor has a pageID child, so that's <xsl:for-each select="*/menuItem[ancestor-or-self::menuItem/pageID = $pageID]"> or just coming down rather than going down and up each time: <xsl:for-each select="*/menuItem[pageID = $pageID]/descendant-or-self::menuItem"> 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
|