RE: ACTION 2016-09-29-004, Abel to propose a table of invocation methods

> * default-mode. The way this is described in 3.7.2, and the way I primarily
> think of it, is as a purely lexical default for the mode attribute of xsl:template
> and xsl:apply-templates elements within its scope. Its use as a default for the
> initial mode seems to have crept in by a side door, and I suggest we get rid of
> it. In fact, I suggest we say nothing about the default for the initial mode;
> leave it as an API matter.

I believe that was the stance I took in the tables I showed. At the bottom of most of them (if not all) I write that whether or not a certain option selects the default mode set in the outermost element is an API matter. However, it does make clear that such an option may be offered (and is offered in processors out there) and what the effect would be.

> * declared-modes. Does this really add value? And if so, is that value really
> worth the cost in complexity? How about dropping the attribute and making
> it mandatory to declare modes with xsl:package, optional with
> xsl:stylesheet?

I believe one of the reasons to add it was that we wanted the simplest possible transformation from xsl:stylesheet (a stylesheet module) into xsl:package (a package manifest). By allowing the default of xsl:package (must declare modes) to be overridden (into may declare modes) anyone replacing the xsl:stylesheet or xsl:transform literally with xsl:package would only have to add declared-modes="no" to have a workable package manifest.

We have a literal transformation in section 3.5 Packages (last paragraph opening section, which seems a bit out of place) which explains  the effect of "the principal stylesheet module of the top-level package may be expressed as an xsl:stylesheet or xsl:transform element".

To drop declared-modes (I have no informed opinion on it yet) would also mean changing the transformation in this section to find to any depth (imports included?) undeclared modes and turning them into declared modes.

Another original motivation for having declared-modes was, I think, to allow stylesheet authors a familiar unchecked (as in: non-declared) environment when they start writing packages. Whether that is a good motivation (sounds a bit like the "strict"  keyword in several BASIC variants and Perl) I cannot decide yet.

I have to think a bit more on the other points risen in your respons. I am all in favor of simplification, but at this stage I think we have to be very careful about it.

Cheers,
Abel

Received on Friday, 14 October 2016 20:10:31 UTC