On Thu, 14 Nov 2013 10:03:41 -0800, Florent Georges <[email protected]> wrote:
> Hi, > > The following expression evaluates properly in QConsole, > provided that there is a schema in scope with a corresponding > element declaration: > > declare namespace e = "http://example.org/"; > validate { <e:example>123</e:example> } > > The following throws an error though: > > declare namespace e = "http://example.org/"; > validate { <e:example>123</e:example> }/* > > See the extra "/*" at the end? The error is: > > XDMP-UNEXPECTED: (err:XPST0003) Unexpected token syntax error, > unexpected Slash_, expecting $end or SemiColon_ > > Version: 6.0-4. Regards, > That's because the validate expr is a peer expression to a path expression in the XQuery grammar, and can't appear as a step in one. You need to wrap it in parentheses: declare namespace e = "http://example.org/"; (validate { <e:example>123</e:example> })/* //Mary _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
