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

Re: XSLT 2.0: Reasons for mode="#all" ?

Subject: Re: XSLT 2.0: Reasons for mode="#all" ?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 6 Jun 2006 14:06:56 +0100
xslt skip element
> I use it to skip nodes.

similarly I have used it to define general fallback or error conditions.

the following is cut from a stylesheet that's in active development here
as part of the day job.


<xsl:template mode="#all" match="*">
<xsl:message>
Unknown element <xsl:value-of select="name()"/>
==
<xsl:copy-of select="."/>
==
</xsl:message>
//
// Unknown element <xsl:value-of select="name(),ancestor-or-self::*[*/@xid][1]/*/@xid"/>
//
</xsl:template>

Basically it means that you can define (or re-define) the equivalent of
the default template which applies to all modes with xslt syntax, rather
than it being a magic internal thing not exactly equivalent to any
expression in the language.


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.