Bug 21130 - [XQ30] require-feature
Summary: [XQ30] require-feature
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3.0 (show other bugs)
Version: Candidate Recommendation
Hardware: Other All
: 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: 19858
  Show dependency treegraph
 
Reported: 2013-02-26 21:19 UTC by Tim Mills
Modified: 2013-03-12 15:49 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Mills 2013-02-26 21:19:20 UTC
The specification makes provision for a processor to disable a feature which it supports in response to a prohibit-feature declaration, but there is no corresponding provision for a processor to enable a feature in response to a require-feature declaration which it supports but which is not enabled by default.

In general, this isn't a problem.  Most optional features do 'no harm' if enabled, I.e. enabling a feature will not cause the failure of query to compile.  A notable exception is the static typing feature.

A processor which supports (has an implementation of) the static typing feature might wish to operate with the feature disabled by default, since most queries are likely to fail static type checking.  It would be enabled expliitly with a require-feature declaration.  It would be unreasonable to expect library authors to include an explicit prohibition of the static typing feature.
Comment 1 Tim Mills 2013-03-07 09:41:01 UTC
Ghislain has proposed:


If a processor that normally does not support feature A encounters a query that has a require-feature option declaration on this feature A, it must do one of the following:
- Process the module using the semantics of this specification with feature A's being supported.
- Raise a static error [err:XQST0120].
Comment 2 Jonathan Robie 2013-03-12 15:42:16 UTC
The Working Group has agreed to the following editorial clarification:

A require-feature option declaration provides a list of named features that must be enabled for the module in which the option declaration occurs; if any declaration requires a feature, it must enable that feature, or raise a static error [err:XQST0120] .
Comment 3 Jonathan Robie 2013-03-12 15:49:16 UTC
I will also change "it" to "the processor" for the sake of clarity:

A require-feature option declaration provides a list of named features that must be enabled for the module in which the option declaration occurs; if any declaration requires a feature, the processor must enable that feature or raise a static error [err:XQST0120].

In addition, I will provide definitions for "enable", "disable", and "support", and improve the error code description.