This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28749 - [Editorial] Variable declaration type T definition
Summary: [Editorial] Variable declaration type T definition
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3.1 (show other bugs)
Version: Candidate Recommendation
Hardware: SGI Windows NT
: P2 normal
Target Milestone: ---
Assignee: Jonathan Robie
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-04 09:12 UTC by Debbie Lockett
Modified: 2015-07-14 02:06 UTC (History)
2 users (show)

See Also:


Attachments

Description Debbie Lockett 2015-06-04 09:12:18 UTC
The second paragraph of 4.16 Variable Declaration begins:
"During static analysis, a variable declaration causes a pair (expanded QName N, type T) to be added to the in-scope variables."

The definition of N follows immediately, but the type T is not defined until a number of paragraphs later, where it says "The type of the declared variable is as follows:...". This paragraph does not explicitly reference the parameter T.

It would be nice to add a reference to T when it is defined, and to mention when N is defined that T will be defined later after all the examples (or possibly even move the paragraph containing T's definition to before the examples).
Comment 1 Michael Kay 2015-06-04 09:45:14 UTC
Note also that the last sentence of 4.16 is redundant and not quite correct:

"If VarValue or VarDefaultValue is evaluated, the static and dynamic contexts for the evaluation are the current module's static and dynamic context."

The earlier paragraphs in the section have already explained the static and dynamic context for evaluation in much more detail than this; and a module as such does not have a dynamic context.
Comment 2 Josh Spiegel 2015-07-14 02:06:15 UTC
I moved the definition of T as suggested in comment 0 and deleted the redundant sentence mentioned in comment 1.