On 26 September 2016 at 08:11, Geert Josten <geert.jos...@marklogic.com> wrote:
> Ah right, didn’t understand it that way.. > > I dug a little deeper in documentation, and noticed that "validate as” is > not conform XQuery 3. It would have been “validate type Q{a}b { … }”. > Searching for “validate as” in the MarkLogic documentation turned up this > section: > > http://docs.marklogic.com/guide/xquery/enhanced#id_90242 > > The "validate as" syntax is a MarkLogic specific extension to XQuery 1.0. > It looks like MarkLogic simply does not support the “validate type” syntax > yet. > MarkLogic (from at least version 6.0) does accept: validate type xs:boolean { <a>true</a> } It also accepts EQNames in most places, just not in the ValidateExpr construct. It looks like that was an omission when extending MarkLogic to support the XQuery 3.0 ValidateExpr and EQName constructs. > Do you have a particular need for it? > I don't have a specific need for it. I found this implementation bug when testing my XQuery language support plugin for IntelliJ I am developing. > I can file an RFE on your behalf.. > Great. Thanks. - Reece > Cheers > > From: <general-boun...@developer.marklogic.com> on behalf of Reece Dunn < > mscl...@googlemail.com> > Reply-To: MarkLogic Developer Discussion <general@developer.marklogic.com> > Date: Sunday, September 25, 2016 at 10:17 PM > To: MarkLogic Developer Discussion <general@developer.marklogic.com> > Subject: Re: [MarkLogic Dev General] The validate as/type construct does > not support URIQualifiedName > > On 25 September 2016 at 20:56, Geert Josten <geert.jos...@marklogic.com> > wrote: > >> Hi Reece, >> >> Have you tried with a more regular qname? The docs give ‘validate as >> xs:boolean’ as example, not URIQualifiedName: >> >> http://docs.marklogic.com/guide/xquery/langoverview#id_55039 >> > > Yes, both 'validate as' and 'validate type' work with QNames like > 'xs:boolean'. Also, MarkLogic supports URIQualifiedNames elsewhere. > > >> Keep in mind that MarkLogic does not cover the full XQuery 3 >> recommendation.. >> > > I'm aware of this. I was reporting it as an implementation bug here, as I > could not find where else to report MarkLogic implementation bugs to. > > Thanks, > Reece > > >> Cheers, >> Geert >> >> From: <general-boun...@developer.marklogic.com> on behalf of Reece Dunn < >> mscl...@googlemail.com> >> Reply-To: MarkLogic Developer Discussion <general@developer.marklogic.com >> > >> Date: Sunday, September 25, 2016 at 1:24 PM >> To: "general@developer.marklogic.com" <general@developer.marklogic.com> >> Subject: [MarkLogic Dev General] The validate as/type construct does not >> support URIQualifiedName >> >> 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/RE >> C-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 >> General@developer.marklogic.com >> Manage your subscription at: >> http://developer.marklogic.com/mailman/listinfo/general >> >> > > _______________________________________________ > General mailing list > General@developer.marklogic.com > Manage your subscription at: > http://developer.marklogic.com/mailman/listinfo/general > >
_______________________________________________ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general