Subject: Re: [xsl] XSLT 2.0: Reasons for mode="#all" ? From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx> Date: Tue, 6 Jun 2006 06:15:28 -0700 |
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).
-- Cheers, Dimitre Novatchev --------------------------------------- Truly great madness cannot be achieved without significant intelligence.
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] XSLT 2.0: Reasons for mod, Michael Kay | Thread | RE: [xsl] XSLT 2.0: Reasons for mod, Michael Kay |
RE: [xsl] XSLT 2.0: Reasons for mod, Michael Kay | Date | Re: [xsl] XSLT 2.0: Reasons for mod, andrew welch |
Month |