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

[Bug 29827] New: [XSLT 3.0] Error XTDE0045 revisited

From: <bugzilla@jessica.w3.org>
Date: Mon, 19 Sep 2016 14:15:16 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29827-523@http.www.w3.org/Bugs/Public/>

            Bug ID: 29827
           Summary: [XSLT 3.0] Error XTDE0045 revisited
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 3.0
          Assignee: mike@saxonica.com
          Reporter: mike@saxonica.com
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

(see also bug #29234, bug #29379 and bug #29475)

I don't think we've got this right yet. Consider test case mode-1705a.

declared-modes="yes" requires a declaration of all the modes that are used;
fine, the stylesheet contains such declarations.

But it's failing because we are using the unnamed mode as the entry point. The
unnamed mode is not and cannot be public. But the way XTDE0045 is worded,
invoking a stylesheet using the unnamed mode is impossible when
declared-modes="yes". I don't believe that's what we intended, and it's not
what the note underneath XTDE0045 says:

<note>Or to put it another way: (a) if a named initial mode is specified, then
it must exist as a public mode in the top-level package, declared implicitly or
explicitly; (b) if the unnamed initial mode is specified and
declared-modes="yes", then there must be an xsl:mode declaration for the
unnamed mode.</note>

Under condition (b), which I believe represents our intent, test cases
mode-1705a is not an error.

See also 6.6.1, which says "A /named/ mode [my emphasis] is not eligible to be
used as the initial mode if its visibility is private."

I think the correct rules are:

(a) if the initial mode is a named mode:

(a(i)) if declared-modes="yes":

The named mode must be declared and must have visibility="public" or "final".

(a(ii)) if declared-modes="no":

The named mode must either be declared with visibility="public", or must be
implicitly declared in the top-level package by virtue of it's appearance in an
xsl:template/@mode attribute

(b) if the initial mode is the unnamed mode:

(a(i)) if declared-modes="yes":

The unnamed mode must be declared.

(a(ii)) if declared-modes="no":

No constraints.


Without these changes, using declared-modes='yes' means that you can't invoke
processing via the unnamed mode, and since that is how 95% of transformations
are initiated today, everyone is going to set declared-modes='no' so they can
continue working the way they are used to.

You are receiving this mail because:
You are the QA Contact for the bug.
Received on Monday, 19 September 2016 14:15:25 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:58:02 UTC