Subject: Re: [xsl] XSLT 2.0: Reasons for mode="#all" ? From: David Carlisle <davidc@xxxxxxxxx> Date: Tue, 6 Jun 2006 14:06:56 +0100 |
> 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSLT 2.0: Reasons for mod, Rene Ladan | Thread | RE: [xsl] XSLT 2.0: Reasons for mod, Michael Kay |
Re: [xsl] roblems with passing vari, David Carlisle | Date | RE: [xsl] XSLT 2.0: Reasons for mod, Michael Kay |
Month |