[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: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Tue, 6 Jun 2006 06:15:28 -0700
|
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@xxxxxxxxxxxx> 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@xxxxxxxxx]
> Sent: 06 June 2006 13:52
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: 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.
|
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
RSS 2.0 |
|
Atom 0.3 |
|
|