Re: [xsl] Question on <xsl:apply-templates>

Subject: Re: [xsl] Question on <xsl:apply-templates>
From: "Robert Ogden" <Robert.Ogden@xxxxxxxx>
Date: Thu, 30 Oct 2003 16:18:43 -0600

I tried your code and I got no output. I started looking up what your
idea was doing, and it matches every node. So if you use:

<xsl:template mode="toc" match="*"/>

Then I started thinking more, I knew you were onto something, so I
finally stumbled across it in a book. I wanted to use (and did):

<xsl:template mode="toc" match="text()"/>

This outputs nothing for every text node.

Thanks for the shove in the right direction though.

Robert Ogden
IETM Developer
Navy Programs
(763) 572-7121

>>> davidc@xxxxxxxxx 10/30/03 09:16PM >>>

> I have a case where I am making a TOC for a large document, and
> XSLT. I am using a mode on my template. I only want to output
> that are matched for the mode (in otherwords only output for the
> templates I have created). It is outputting every node, not just the
> ones denoted by the mode.

The default template in a mode does the same as the default unmoded
For elements it  generates no output but recurses on the children, and
for text it produces the text.

So probably you just want to add

<xsl:template mode="toc" match="*"/>

to zap the rest.



 XSL-List info and archive: 

**********CONFIDENTIALITY NOTICE**********
The information contained in this e-mail may be proprietary and/or 
privileged and is intended for the sole use of the individual or 
organization named above.  If you are not the intended recipient or an 
authorized representative of the intended recipient, any review, copying
or distribution of this e-mail and its attachments, if any, is prohibited.
If you have received this e-mail in error, please notify the sender
immediately by return e-mail and delete this message from your system.

 XSL-List info and archive:

Current Thread