W3C home > Mailing lists > Public > public-qt-comments@w3.org > December 2012

[Bug 20356] New: 4.17: Context Item Declaration (editorial)

From: <bugzilla@jessica.w3.org>
Date: Wed, 12 Dec 2012 08:41:32 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-20356-523@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=20356

            Bug ID: 20356
           Summary: 4.17: Context Item Declaration (editorial)
    Classification: Unclassified
           Product: XPath / XQuery / XSLT
           Version: Member-only Editors Drafts
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: XQuery 3.0
          Assignee: jonathan.robie@gmail.com
          Reporter: jmdyck@ibiblio.org
        QA Contact: public-qt-comments@w3.org
             Group: XSLXQuery_WG

In 4.17 Context Item Declaration, ...

----------
(A)
"During static analysis, the context item declaration has the effect of
setting the context item static type T in the static context."

    Append "of the current module".


----------
(B)
"If a module contains more than one context item declaration, a static
error is raised [err:XQST0099]."

    The position of this paragraph is slightly odd. Maybe move it up
    to become the section's 3rd para (i.e., right after [err:XQST0113]).
    [First dispense with the static error cases, then we can focus on
    the statically-okay cases.]


----------
(C)
"The static context for an initializing expression includes ..."

    After "initializing expression", it might help to insert:
        "(VarValue or VarDefaultValue)"

    (Note that "initializing expression" is a defined term, but only
    for variable declarations.)


----------
(D)
"During query evaluation, a singleton focus is created in the dynamic
context for the evaluation of the QueryBody in the main module, and for
the initializing expression of every variable declaration in every
module, ..."

    Replace:
        "the dynamic context for the evaluation of the QueryBody in the
        main module, and for the initializing expression of every
        variable declaration in every module"
    with:
        "the dynamic context of every module in the query"


----------
(E)
"..., selecting the context item for the singleton focus as follows:"

    It probably wouldn't hurt to say that this selection depends on the
    ContextItemDecl (if any) in the main module.


----------
(F)
"If VarValue is specified, then the result of evaluating VarValue as
described below."

    Delete "as described below" -- the description no longer exists.


----------
(G)
"if no value is provided for the context item by the external
environment, and VarDefaultValue is specified, the static and ..."

    To be consistent with this bullet-list's syntax of 
        "if CONDITION, then VALUE"
    change to 
        "... and VarDefaultValue is specified, then the result of
        evaluating VarDefaultValue. The static and ..."

(Mind you, I don't much like the "if CONDITION, then VALUE" syntax.)


----------
(H)
"the static and dynamic contexts for the evaluation are the current
module's static and dynamic context."

    H.1:
    It would be clearer to replace "current" with "main".

    H.2:
    And you can leave out "static" since:
    (a) the dynamic context contains everything needed for evaluation;
    (b) an earlier para already said what the static context is.

    H.3:
    In fact, you might want to pull this sentence out, make it a para
    after the bullet list, and generalize it to cover VarValue as well
    as VarDefaultValue (parallel to the earlier para about static
    context of initializing expressions).


----------
(I)
The bullet list fails to address the case where:
  -- the ContextItemDecl in the main module specifies 'external' but no
     VarDefaultValue (or, equivalently, doesn't exist), and
  -- the external environment does not provide a value.
(It's not an error, but any attempt to access the initial context item
will raise an error.)


----------
(J)
"In all cases where the context item has a value, that value must match
the type T ..."

    In this para, change the 2 occurrences of "the context item" to
    "the initial context item".

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Wednesday, 12 December 2012 08:41:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 12 December 2012 08:41:38 GMT