[Bug 29225] New: [XQ31] Pragma in no namespace

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29225

            Bug ID: 29225
           Summary: [XQ31] Pragma in no namespace
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery 3.1
          Assignee: jonathan.robie@gmail.com
          Reporter: mike@saxonica.com
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

(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?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 22 October 2015 08:52:57 UTC