[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: No-output identity template?
> I don't know what template or rule is causing its creation, It's the default element rule in the mode sub-menu Here <xsl:template match="/"> <xsl:apply-templates mode="sub-menu" /> you apply this mode to all child elements, there is just one, <menu>, you don't have a template for that so the default gets applied which just recurses on child nodes, in the same mode. so now this mode is applied to the two child nodes of menu. The first is an item containing an item so <xsl:template match="item[item]" mode="sub-menu"> applies. the second is an item not containing an item so none of your templates applies so the default will fire. This will in turn apply the sub-menu mode templates to the text node children of the item node and you get bugs bunny. so either you want a template for menu in sub-menu that is more careful in which children it applies templates to, or simpler if it does the job, <xsl:template match="item" mode="sub-menu"/> which will zap all items not covered by the higher priority match="item[item]" template David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ 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
|