xsl-list
[Top] [All Lists]

Re: [xsl] Default actions in XSLT 2.1

2008-11-01 16:48:37
On Sat, Nov 1, 2008 at 1:33 PM, Jirka Kosek <jirka(_at_)kosek(_dot_)cz> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dimitre Novatchev wrote:

Going further, I'd propose that the *default value* for the
"default-action" attribute of the unnamed <xsl:mode> be
   "xslmode:clone"
if the "version" attribute of the <xsl:stylesheet>    is    >=   2

and
  "xslmode:copy-text"  (the current processing behaviour for version 1.0)
otherwise.

This is not very good idea. Suppose that you have existing stylesheet in
XSLT 1.0 or 2.0 and you will upgrade it to 2.1 in order to use some new
useful XPath function. With your proposal which breaks backwards
compatability you will have to update existing code to accommodate to
new set of built-in template rules.

Good observation.  To fix this, replace in my post the following:

Going further, I'd propose that the *default value* for the
"default-action" attribute of the unnamed <xsl:mode> be
   "xslmode:clone"
if the "version" attribute of the <xsl:stylesheet>    is    >=   2

and
  "xslmode:copy-text"  (the current processing behaviour for version 1.0)
otherwise.

with:

 Going further, I'd propose that the *default value* for the
 "default-action" attribute of the unnamed <xsl:mode> be
    "xslmode:clone"
 if the "version" attribute of the <xsl:stylesheet>    is    >   2

 and
   "xslmode:copy-text"  (the current processing behaviour for version
1.0 and 2.0)
 otherwise.


-- 
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play



- --
- ------------------------------------------------------------------
 Jirka Kosek      e-mail: jirka(_at_)kosek(_dot_)cz      http://xmlguru.cz
- ------------------------------------------------------------------
      Professional XML consulting and training services
 DocBook customization, custom XSLT/XSL-FO document processing
- ------------------------------------------------------------------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
- ------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJDL0WzwmSw7n0dR4RAjmcAJ4yskBNZdpIieML1hyfYTDrzjFGKQCgg+0R
J/W0meBL4Mx1+OVuSftYFjs=
=fCeR
-----END PGP SIGNATURE-----

--~------------------------------------------------------------------
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>
--~--