[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

default template (was:RE: text() and not())

Subject: default template (was:RE: text() and not())
From: "Andrew Welch" <andrew@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 8 Jan 2002 14:36:37 -0000
xsl override default template
>but again, if you don't want titles it is far more common to have a
>template matching title that does nothing rather than matching on title,
>doing the default template which recurses on to the text nodes and then
>having a template that does not copy those text nodes. Doing it this way
>just makes things far more complicated than you need.
>
>David

Sorry David, I still dont understand... but because the way I am doing it is
poor I want to do it the way you are saying.

I have a stylesheet (prob. very common) that looks something like:

<xsl:template match="/">
<html>
...
<body>
  <xsl:apply-templates/>
</body>
</html>
</xsl:template>

Then follows a load of templates to deal with the interesting parts of the
XML file.  As I understand, <xsl:apply-templates/> will read through the
source xml and look for templates in the stylesheet to process them with.
(push-processing right?) If it encounters an element that doesnt have a
matching template, it will invoke a default template depending on the type
of element (atribute, comment etc) it has encountered.  In which case, I
have to include my own template to do nothing, to override the default one.

So, I guess Im asking what do I use instead of <xsl:apply-templates/> within
the <xsl:template match="/"> template to stop the default template being
invoked?

andrew

===


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.