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 29225 - [XQ31] Pragma in no namespace
Summary: [XQ31] Pragma in no namespace
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3.1 (show other bugs)
Version: Last Call drafts
Hardware: PC 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:
 
Reported: 2015-10-22 08:52 UTC by Michael Kay
Modified: 2015-11-10 17:31 UTC (History)
1 user (show)

See Also:


Attachments

Description Michael Kay 2015-10-22 08:52:46 UTC
(A) We allow the name of a pragma to be an EQName, and this introduces the possibility that it is a name in no namespace.

But the text goes on to assume that the name will always have a namespace: "If the namespace URI of a pragma's expanded QName is not recognized..."

I would suggest as the simplest fix, changing: 

"If the namespace URI of a pragma's expanded QName is not recognized by the implementation as a pragma namespace..."

to:

"If the namespace URI of a pragma's expanded QName is not recognized by the implementation as a pragma namespace, or if the name is in no namespace, ..."


(B) We say in a Note in 3.22:

"Since there is no default namespace for pragmas, a pragma's EQName must provide a BracedURILiteral or a namespace prefix."

This invites the reader to look for a normative statement that there is no default namespace for pragmas, but there is no such statement. Furthermore, the common rule in situations where there is no default namespace is that the name is assumed to be in no namespace: so the "since" is a non-sequitur. The Note appears to define a "must" condition, with no associated error code, that is not stated normatively anywhere else. 

I would be inclined to resolve this by wrapping it into the proposal above for handling of no-namespace names. Replace the Note by a (non-note) paragraph:

"If the EQName is an unprefixed NCName, it is interpreted as a name in no namespace (and the pragma is therefore ignored)."

(C) If the expression between the curly braces after a pragma is absent, and the pragma is ignored, we say this is an error (XQST0079). Should we bring this into line with other (new) uses of "{Expr?}" so that it is instead interpreted as an empty sequence?
Comment 1 Josh Spiegel 2015-11-06 15:47:10 UTC
The working group decided to accept suggestion (C) in comment 0:

  ACTION A-622-08: JR to change the words of the XQuery spec to
  implement item (C) of bug 29225 [XQ31] Pragma in no namespace.

As a result, the following tests should no longer expect XQST0079:

  K-ExtensionExpression-7
  extexpr-2
  XQST0079 (in CombinedErrorCodes.xml)
Comment 2 Jonathan Robie 2015-11-09 22:39:06 UTC
This change has been made in the internal drafts.