[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Default actions in XSLT 2.1

Subject: RE: Default actions in XSLT 2.1
From: "Scott Trenda" <Scott.Trenda@xxxxxxxx>
Date: Mon, 3 Nov 2008 09:42:35 -0600
RE:  Default actions in XSLT 2.1
I'd like to throw in my two cents here.

I know MSXML (and perhaps Saxon and libxslt, I haven't looked into it) offers
a startMode parameter, which allows processing to start in a specified mode.
This is a very useful way to roll several smaller stylesheets into one generic
stylesheet. Is there an easy way to include a switch or parameter like this in
the proposed <xsl:mode> enhancements? As it stands right now, the only way to
specify this is in the processor's implementation.

Note that I'm not trying to tailgate in dozens of additional theoretical "this
might be useful somewhere" requirements a la CSS3. I'm just saying that it's
come across as a basic common-usage requirement in several places in my own
usage, and it'd be great to have it defined in the basic specification
somewhere. :)

~ Scott

-----Original Message-----
From: Michael Kay [mailto:mike@xxxxxxxxxxxx]
Sent: Friday, October 31, 2008 6:10 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  Default actions in XSLT 2.1

> I would propose:
>
>   <xsl:mode default-action="clone"/>
>
> I would suggest to consider the verb:
>
>   <xsl:process/>
> or
>
>   <xsl:processing-mode/>
>
> instead of <xsl:mode/>
>
> as we already have a "mode" attribute with slightly different
> scope (template selection).

The idea is to make modes (the things named in the mode attribute of
xsl:template and xsl:apply-templates) first class objects that can have
properties; the properties would be declared as attributes of an xsl:mode
declaration; one of the properties is the choice of default template rules
for the mode. An xsl:mode declaration with no name attribute declares the
properties of the unnamed ("default") mode, just as an xsl:decimal-format
declaration with no name defines properties of the default decimal-format.

No doubt the choice of keywords will continue to provide entertainment for
some while; I tend to the view that when you hear people arguing the
spelling of the keywords, it's like when a sales prospect starts arguing
about the price; you can smell victory.

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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.