Re: [xsl] Theory: Identity Transforms

Subject: Re: [xsl] Theory: Identity Transforms
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 1 Feb 2006 17:39:23 GMT
> I don't understand the difference between the two. Thanks in advance.

Ignore the mode="copy" (for now)

The first one applies templates to child nodes and attributes
The second one copies attributes and just applies templates to child

If this is the only template applying templates to attributes is the
same as copying them, b ut if you add

<xsl:template match="@important"/>

Then the first template will apply this template to any important
attribute  and (so) not copy it.

The second one will alwys copy all attributes on any elements that it is

One example used a mode and one did not, that is something elese you
could use (or not use) a mode with either style. Modes allow you to have
separate sets of templates that you apply in different contexts.


This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:

Current Thread