Subject: Re: [xsl] No-output identity template? From: David Carlisle <davidc@xxxxxxxxx> Date: Thu, 23 Jan 2003 15:07:55 GMT |
> 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] No-output identity templa, G. Ken Holman | Thread | RE: Re: [xsl] No-output identity te, cknell |
Re: [xsl] No-output identity templa, G. Ken Holman | Date | [xsl] Can I substitute a predefined, Ganesh Murthy |
Month |