Re: Done: ACTION A-636-08 (ExtensionExpr)

On 16-04-14 05:05 PM, Robie, Jonathan wrote:
> Done and checked in.
>
> Jonathan
>
> ACTION A-636-08: Jonathan to adopt the proposal in comment 0 of bug 29526.

That is, <https://www.w3.org/Bugs/Public/show_bug.cgi?id=29526>
[XQ31] Incompatible change to ExtensionExpr.

See 
https://www.w3.org/XML/Group/qtspecs/specifications/xquery-31/html/xquery-31-diff.html#doc-xquery31-ExtensionExpr

In 3.22 "Extension Expressions", note that (as a result of the resolution of 
the above bug) the production:
     ExtensionExpr ::= Pragma+ EnclosedExpr
has changed to:
     ExtensionExpr ::= Pragma+  "{" Expr? "}"

However, the para after the EBNF still says:

     An extension expression consists of one or more *pragmas*,
     followed by an /enclosed expression/.

Technically, this isn't correct, because "An *enclosed expression* is an 
instance of the EnclosedExpr production", and the thing after the pragmas is 
no longer an instance of EnclosedExpr.

Similarly, a couple paragraphs later, the two references to "content 
expression" are incorrect, because that term is defined only for enclosed 
expressions.

To fix this, you might consider using a new term, e.g. "fallback expression":

     ... *pragmas*, followed by an optional expression
     (the *fallback expression*) enclosed in braces.
     ...
     If the fallback expression is omitted, ....

----

Also, there's wording problem re XQST0079. Currently, the text says:

     If all the pragmas in an ExtensionExpr are ignored, then the value
     of the ExtensionExpr is the value of the content expression.
     If the content expression is not provided explicitly,
     a static error is raised [err:XQST0079].

The intent is that the second sentence is within the 'scope' of the If-then 
opened up by the first sentence, i.e.
     (# foo:bar #) {}
is a static error only if the implementation doesn't recognize the ns 
denoted by 'foo'. However, that intent isn't obvious, and it's easy to read 
the last sentence as stand-alone, i.e.
     (# foo:bar #) {}
is always a static error.

-Michael

Received on Monday, 18 April 2016 16:13:17 UTC