[Bug 24764] New: [xslt 3.0] xsl:context-item and the initial input sequence

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 24764] New: [xslt 3.0] xsl:context-item and the initial input sequence

Bugzilla from bugzilla@jessica.w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=24764

            Bug ID: 24764
           Summary: [xslt 3.0] xsl:context-item and the initial input
                    sequence
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 3.0
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]

In the latest spec we distinguish between "priming" a stylesheet, at which
point we supply an initial context item, and invoking an initial mode, at which
point we supply an "initial input sequence".

The documentation for xsl:mode/xsl:context-item continues to talk about it
constraining the "initial context item for the mode", which doesn't match the
new terminology, nor the fact that it can now be a sequence rather than an
item.

In addition, we now have no way to declare anything about the initial context
item used for initializing global variables.

Suggestion:

(a) we allow xsl:context-item as a child of xsl:package, to declare the
expected type of the context item used by the global variables in that package.
(There is only one initial context item for the transformation, and it must
match the requirements of all packages).

(b) in xsl:mode, we remove the xsl:context-item child. We could replace it with
some new element/attribute that gives the required type of the initial input
sequence, but this isn't really needed because it can be constrained using the
match attributes of the templates in the mode, together with an
"on-no-match='fail'" attribute at the mode level.

--
You are receiving this mail because:
You are the QA Contact for the bug.

Reply | Threaded
Open this post in threaded view
|

[Bug 24764] [xslt 3.0] xsl:context-item and the initial input sequence

Bugzilla from bugzilla@jessica.w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=24764

--- Comment #1 from Michael Kay <[hidden email]> ---
I would also suggest a change in terminology:

(a) call the context item for evaluating global variables the "global context
item" (rather than initial context item), to establish a clearer link with
global variables and reduce the linkage with the initial template.

(b) call the "initial input sequence" the "initial match selection" to link it
more closely to the "apply-templates" style of processing. (Using "selection"
rather than "sequence" works better since most of the time it will be a single
item.)

--
You are receiving this mail because:
You are the QA Contact for the bug.

Reply | Threaded
Open this post in threaded view
|

[Bug 24764] [xslt 3.0] xsl:context-item and the initial input sequence

Bugzilla from bugzilla@jessica.w3.org
In reply to this post by Bugzilla from bugzilla@jessica.w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=24764

Michael Kay <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #2 from Michael Kay <[hidden email]> ---
The WG considered this today and asked the editor to produce a detailed
proposal.

Proposal (still an outline, but the next stage is drafting within the XML
master):

1. Change the term "initial context item" to "global context item".

Note: some refereces to the ICI, eg that in the second bullet of 2.3.3 and that
in the first bullet of 2.10, and in the last sentence of 3.9, are incorrect,
and should refer to items in the initial match selection.

2. Change the term "initial input sequence" to "initial match selection".

3. Add to the (two different) definitions of "source tree" in 2.1 and 4.4,
"trees containing nodes that are present in the initial match selection".

4. Drop xsl:context-item as a child of xsl:mode. This mainly affects 6.6.1 and
6.7 (in a substantial but fairly obvious way), and other isolated references to
xsl:context-item throughout the document.

5. Introduce a new top-level declaration xsl:global-context-item with the same
content model as the current xsl:context-item, and semantics closely modelled
on the xsl:context-item that currently appears as a child of xsl:mode; but
constraining the global context item, not the initial match selection. If there
are multiple declarations within a package the highest precedence one wins. If
there are declarations in several packages then the global context item must
satisfy all of them.

6. Rework the two examples (in 2.9 and 6.7.1) showing how to constrain the
global conetxt item and/or the initial match selection.

--
You are receiving this mail because:
You are the QA Contact for the bug.

Reply | Threaded
Open this post in threaded view
|

[Bug 24764] [xslt 3.0] xsl:context-item and the initial input sequence

Bugzilla from bugzilla@jessica.w3.org
In reply to this post by Bugzilla from bugzilla@jessica.w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=24764

--- Comment #3 from Michael Kay <[hidden email]> ---
Note, the changes have been applied to the spec but the bug is still open
awaiting WG review

--
You are receiving this mail because:
You are the QA Contact for the bug.

Reply | Threaded
Open this post in threaded view
|

[Bug 24764] [xslt 3.0] xsl:context-item and the initial input sequence

Bugzilla from bugzilla@jessica.w3.org
In reply to this post by Bugzilla from bugzilla@jessica.w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=24764

Michael Kay <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Michael Kay <[hidden email]> ---
The relveant parts of the spec were reviewed last week so this is now resolved.

--
You are receiving this mail because:
You are the QA Contact for the bug.