One commonality in my understanding of all the replies is that
mode="#all"
should be used only when the programmer really knows what he is doing
and as a last resort in extreme cases (catch-all, fallback, etc).
Could a clause to that effect be included in the XSLT 2.0 spec?
Probably wishful thinking...
Thanks for all the replies.
--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
On 6/6/06, Michael Kay <mike(_at_)saxonica(_dot_)com> wrote:
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(_at_)gmail(_dot_)com]
> Sent: 06 June 2006 13:52
> To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
> 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.
>
> --~------------------------------------------------------------------
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
> To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
> or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
> --~--
>
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--