[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|