Re: Catch ALL

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

Re: Catch ALL | Failed template rule

Subject: Re: Catch ALL | Failed template rule
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 21 Mar 2005 16:27:14 GMT
Re:  Catch ALL | Failed template rule
> It's much cleaner
> to right a single apply-templates rule.  Uggg.

Actually I can't guess how such a "null template" would work, the model
is that when applying templates the system is just working along a node
set of selected nodes, it never takes any actions that depend on the
particular select attribute that is used, just on the nodes that are
selected. So given an empty node set there's not really much else it
could do but do nothing.

apply-templates are used when the structure of the result is determined
by the structure of the input. (the so called push model of processing)
In your case, it sounds like you want the structure of the result to be
more controlled by the structure of the stylesheet (the so called pull
model) in which case you'd typically use 
<xsl:if test=something>
  <xsl:value-of select=somethingelse>
</xsl:if>
rather more than you use 
<xsl:apply-templates/>

David


________________________________________________________________________
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:
http://www.star.net.uk
________________________________________________________________________

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.