W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2015

[Bug 29146] New: [FO31] fn:transform options update

From: <bugzilla@jessica.w3.org>
Date: Wed, 23 Sep 2015 18:40:30 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29146-523@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29146

            Bug ID: 29146
           Summary: [FO31] fn:transform options update
           Product: XPath / XQuery / XSLT
           Version: Proposed Recommendation
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Functions and Operators 3.1
          Assignee: mike@saxonica.com
          Reporter: abel.braaksma@xs4all.nl
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

Since we are approaching CR for XSLT 3.0, I had a look at the fn:transform
function and had a few observations / suggestions / improvements (mainly w.r.t.
XSLT 3.0):

1) there should only be one of stylesheet-location/-text/-node present

2) stylesheet-base-uri can be made relative to the current base-uri in scope,
or relative to the stylesheet-location or -node.

3) base-output-uri should be allowed to be a relative URI, as most processors
currently take it as defaulting to the current stylesheet-base-uri. This can
also be the default if absent.

4) source-node, text says "required unless initial-template is defined", it is
also not required if initial-function is defined.

5) source-node: is defined as node(), but can (in XSLT 3.0) be any item, or
even sequence of items. Perhaps combine with initial-match-selection (see
below)?

5) initial-mode: if supplied, initial-template *and* initial-function must be
absent

7) initial-template: if supplied, initial-mode *and* initial-function must be
absent

8) initial-function: if supplied, initial-mode *and* initial-template must be
absent and source-node will be ignored.

9) if *none* of initial-mode/-template/-function is supplied, and if a
source-node is supplied, initial-mode is the #unnamed mode, or the mode defined
on the outermost stylesheet element in [xsl:]default-mode. If no source-node is
supplied, initial-template is xsl:initial-template (these rules follow the
rules in XSLT 3.0, xsl:initial-template is meant to be the "int main()" of the
stylesheet).

10) package-version: this is currently xs:decimal, but should be a string. XSLT
3.0 has a production for how the string is allowed to be created. It can take a
fixed version or a range. Valid are 1.1+, 2.3-alpha, 1.0-3.1 etc

11) package-version: if not supplied, default to "*"

12) package-name: if supplied, stylesheet-location/-node/-text should all be
absent and package-node must be present.

13) package-node: add a package-location and package-text similar to
stylesheet-location and stylesheet-text? At least one of those must be present
if package-name is specified.

14) packages, general. Since used packages are recognized by name (URI) it is
probably good to allow a parameter to set a map with key/value pairs for URI +
version number vs location.

15) packages: they can be precompiled or not. If not precompiled, it should be
made possible to set their static params (which are private to the package and
can collide).

16) initial-match-selection: it is now possible to have a different initial
match selection than a global context item. By default, they should (probably)
be set to source-node. The initial-match-selection can be any sequence of items
of any type, and can be empty. It only makes sense to specify it with
initial-mode.

As an after-thought, perhaps we can add a required option that specifies the
requested type of invocation. For instance: invocation-type: mode | template |
function. And instead of initial-template/-function/-mode we could settle with
initial-component, which, if absent defaults to the defaults of that component
(#unnamed mode, xsl:initial-template, function invocation has no default).

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Wednesday, 23 September 2015 18:40:33 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 23 September 2015 18:40:34 UTC