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/>

            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, ...

"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".

"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.]

"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.)

"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, ..."

        "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"
        "the dynamic context of every module in the query"

"..., 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.

"If VarValue is specified, then the result of evaluating VarValue as
described below."

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

"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.)

"the static and dynamic contexts for the evaluation are the current
module's static and dynamic context."

    It would be clearer to replace "current" with "main".

    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.

    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).

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.)

"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 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:51 UTC