[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] template precedence problem
Hi All, Im have two template matches: <xsl:template match="Cost"/> and <xsl:template match="*[ not(document('')//set:Sets/set:Set[@name='elementRules']/set:Item[@name=name()]) ]"> I'd really like to apply specific template matches like "Cost" in preference to my more generic "*[...]". However *[..] seems to take precedence over "Cost". If I change *[...] to * precendence occurs the way I'd like "Cost" is matched in preference to "*". The XLST programmers spec indicates that this is correct behaviour. Why does the xpath spec(?) allow more generic template matches to take higher priority?. Will this occur in XPATH 2.0? Can someone provide me with an xpath for my match *[..] that takes lower priority? I have sucessfully corrected this by setting the priority attribute on *[...] to a lower value. However I dislike doing this because it means every time I add a new template to my stylesheet I need to think about its priority in contrast the the prirorities I've forcibly adjusted. thanks, :) Ben XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|