Subject: Re: default template (was:RE: [xsl] text() and not()) From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Tue, 08 Jan 2002 14:59:24 -0500 |
Cheers, Wendell
If you have an element <x> that has all sorts of children that yuu don't want to process, it is more nomal to have a template for x which does not call apply-templates and so naturally doesn't process its children than it is to use a template for x that does use apply templates and then make templates for each child that does nothing.
If only some of x's children need zapping, suppose you have
<x> <a>a text</a> <b>b text</b> <c>c text</c> </x>
and yoy want b to go, it is more natural to say
<xsl:template match="b"/>
ie have an empty template for b than to allow b to have the default template which would process its text child, and then have
<xsl:template match="text()[parent::b]"/>
David
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: default template (was:RE: [xsl], David Carlisle | Thread | Re: [xsl] text() and not(), David Carlisle |
Re: mapping (Was: Re: [xsl] Re: . i, Jeni Tennison | Date | [xsl] Whitespace in XSLT: Everythin, Joshua Allen |
Month |