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

Re: your mail

Subject: Re: your mail
From: Mike Brown <mike@xxxxxxxx>
Date: Sat, 10 Jun 2000 21:29:01 -0600 (MDT)
Re: your mail
> <xsl:template match="*" />
> 
> I was looking at an xsl file; it had the above line and right above it the 
> comment:
> 
> <!-- The template with match="*" below is a fail-safe.  If at any point we 
> get to a node in the XML tree that doesn't match any of our template match 
> statements, we replace that node with blank space. -->
> 
> 
> This is in the context of going through an xml file and creating an html 
> table. I think I understand what this means, but when (or maybe even why) 
> would a condition like this happen? I commented out <xsl:template match="*" 
> /> and I still got the same table.

If you understand the processing model of XSLT, whereby processing begins
at the root node and from there everything that happens is a result of
processing templates (some of which may be built-in as prescribed by the
spec), then it should be apparent that the authors of this XSLT document
are simply overriding the built-in template for all elements.

Why would they want to do this? Perhaps because they know that the XML
schema may change, and they don't want any new, unaccounted-for element
types that don't have explicitly matching templates of their own to be
processed by the built-in template.

   - Mike
____________________________________________________________________
Mike J. Brown, software engineer at         My XML/XSL resources:
webb.net in Denver, Colorado, USA           http://www.skew.org/xml/


 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.