xsl-list
[Top] [All Lists]

RE: [xsl] How to apply templates to all child elements except a few

2006-10-17 12:00:37
I want to write something like apply templates to all 
elements except CHILD4. How do I do this?

In XSLT 2.0:

<xsl:apply-templates select="* except CHILD4"/>

In 1.0, it's simplest to apply-templates to all elements, and have a no-op
template

<xsl:template match="CHILD4"/>

(using a special mode if necessary)

Michael Kay
http://www.saxonica.com/ 


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--