[Bug 29370] New: Optional Operand for Validate Expression

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

            Bug ID: 29370
           Summary: Optional Operand for Validate Expression
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery 3.1
          Assignee: jonathan.robie@gmail.com
          Reporter: josh.spiegel@oracle.com
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

The grammar for ValidateExpr was recently changed so that the operand
expression is optional:
https://www.w3.org/XML/Group/qtspecs/specifications/xquery-31/html/xquery-31.html#id-validate 

> [102]    ValidateExpr    ::=    "validate" (ValidationMode | ("type" TypeName))? EnclosedExpr
> [103]    ValidationMode    ::=    "lax" | "strict"
> [36]    EnclosedExpr    ::=    "{" Expr? "}"

Here is a relevant bug: 
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29185 

Here is a relevant decision from meeting #621 on 10/27/2015:

> DECISION: WG has agreed to refactor the grammar using the EnclosedExpr in the node constructors, but in the case of the element constructor we shall not use it in the first argument because it cannot be an empty sequence.  Consider the expressions Try, Catch, Validate, ExtensionExpr, Ordered and Unordered, CompDocConstructor, CompAttrConstructor, CompTextConstructor, CompCommentConstructor CompPIConstructor and Namespace

Currently XQuery 3.1 says the following: 

> If the operand of a validate expression does not evaluate to exactly one document or element node, a type error is raised [err:XQTY0030]. 

The specification needs to clarify what it means if the operand is absent.

Once the specification is updated, it is likely one of the following groups of
tests will also need to be updated:

   K-CombinedErrorCodes-13a 
   K-CombinedErrorCodes-14a 
   K-CombinedErrorCodes-15a 

This group expects the validate expression to return empty when absent.  The
next group expects XQTY0030 when the input is empty:

   K-CombinedErrorCodes-10 
   XQTY0030 
   qischema90171-err

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

Received on Tuesday, 12 January 2016 18:16:43 UTC