RE: [xsl] XSLT 2.0: Reasons for mode="#all" ?

Subject: RE: [xsl] XSLT 2.0: Reasons for mode="#all" ?
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 6 Jun 2006 14:08:56 +0100
I think the only time I've used it is for a catch-all:

<xsl:template match="*" mode="#all">
  <xsl:message terminate="yes">No template provided for element
....</xsl:message>
</xsl:template>

or

<xsl:template match="*" mode="#all">
  <xsl:comment>start processing element ...</xsl:comment>
  <xsl:next-match/>
  <xsl:comment>end processing element ...</xsl:comment>
</xsl:template>

I think the theory was that if system-defined built-in templates can apply
to all modes, then user-defined templates should have the same capability.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: Dimitre Novatchev [mailto:dnovatchev@xxxxxxxxx] 
> Sent: 06 June 2006 13:52
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] XSLT 2.0: Reasons for mode="#all" ?
> 
> I was wondering if somebody could provide an example where using
> 
>    mode="#all"
> 
>    (http://www.w3.org/TR/xslt20/#modes)
> 
> is necessary and useful.
> 
> 
> It seems to me that using this feature can be dangerous and 
> harmful -- when should we recommend it?
> 
> --
> Cheers,
> Dimitre Novatchev
> ---------------------------------------
> Truly great madness cannot be achieved without significant 
> intelligence.

Current Thread