This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: The notion of Inheritance?
- To: William Bagby <williamb at adone dot com>
- Subject: Re: [xsl] The notion of Inheritance?
- From: Jeni Tennison <mail at jenitennison dot com>
- Date: Thu, 29 Mar 2001 19:18:56 +0100
- CC: "XSL Mailing List (E-mail)" <xsl-list at lists dot mulberrytech dot com>
- Organization: Jeni Tennison Consulting Ltd
- References: <F991D4265D6AD4119A1900508BC98E572FD5E0@NTEXCL01>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi William,
> I was a bit hasty with my reply.
Ahh, good. I was a bit confused by it.
> I also cannot figure out how to prevent the rest of the data from passing
> through.
If you select what to process with an xsl:apply-templates, then the
processor won't process the bits you don't select. I just posted
giving a demonstration of that.
> Normally I would use something like:
>
> <xsl:template match="*|@*|text()">
> <!-- do nothing! -->
> </xsl:template>
>
> but that doesn't work here, as you've already matched *[*] and
> *[not(*)], which seems to cover pretty much everything, although I
> could be (and probably am!) mistaken.
Those templates are assigned a different ('inherit') mode, so they'll
only be applied when templates are applied in 'inherit' mode. So you
could use an empty default template like the one above if you wanted.
However, usually if you only want to process a little bit of your file
it's more efficient to tell the processor to only process that bit (a
pull approach) rather than getting it to process everything (which is
what it does by default) and only give templates for the things you're
interested in (a push approach).
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list