Hi all,

I have found an issue in the MarkLogic support for XQuery 3.0 'validate
type' constructs on MarkLogic 6.0 - 8.0 (https://www.w3.org/TR/2014/
REC-xquery-30-20140408/#prod-xquery30-ValidateExpr).

Given:

    xquery version "1.0-ml";
    validate as Q{a}b { <test/> }

MarkLogic reports a parser error ("[1.0-ml] XDMP-UNEXPECTED: (err:XPST0003)
Unexpected token syntax error, unexpected URIQualifiedName_"). It is valid
to have a URIQualifiedName here according to the XQuery 3.0 grammar:

[101]    ValidateExpr
<https://www.w3.org/TR/2014/REC-xquery-30-20140408/#doc-xquery30-ValidateExpr>
   ::=    "validate" (ValidationMode
<https://www.w3.org/TR/2014/REC-xquery-30-20140408/#prod-xquery30-ValidationMode>
| ("type" TypeName
<https://www.w3.org/TR/2014/REC-xquery-30-20140408/#prod-xquery30-TypeName>))?
"{" Expr
<https://www.w3.org/TR/2014/REC-xquery-30-20140408/#prod-xquery30-Expr> "}"
[190]    TypeName
<https://www.w3.org/TR/2014/REC-xquery-30-20140408/#doc-xquery30-TypeName>
   ::=    EQName
<https://www.w3.org/TR/2014/REC-xquery-30-20140408/#prod-xquery30-EQName>
[196]    EQName
<https://www.w3.org/TR/2014/REC-xquery-30-20140408/#doc-xquery30-EQName>
   ::=    QName
<https://www.w3.org/TR/2014/REC-xquery-30-20140408/#prod-xquery30-QName> |
URIQualifiedName
<https://www.w3.org/TR/2014/REC-xquery-30-20140408/#prod-xquery30-URIQualifiedName>

This also affects the MarkLogic specific 'validate as' syntax.

Kind regards,
Reece
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to