1

I have the following XQuery command to retrive documents on the qconsole

declare namespace xsi = "http://www.w3.org/2001/XMLSchema-instance";
(/record[@xsi:noNamespaceSchemaLocation eq 'http://foobar.xsd']);

and I try to export the data through mlcp but I got syntax error.

mlcp.sh export -host xxx.xxx.xxx.xxx -port 8000 -username ####-password ####### \
  -mode local -output_file_path ./mlcp_export -database ##### \
  -path_namespace 'xsi,http://www.w3.org/2001/XMLSchema-instance' \
  -document_selector '/record[@xsi:noNamespaceSchemaLocation eq 'http://foobar.xsd']'
23/08/15 17:41:09 ERROR contentpump.LocalJobRunner: Error getting input splits: 
23/08/15 17:41:09 ERROR contentpump.LocalJobRunner: com.marklogic.xcc.exceptions.XQueryException: XDMP-UNEXPECTED: (err:XPST0003) Unexpected token syntax error, unexpected Colon_, expecting Comma_ or Rbrack_ or SemiColon_

Can someone show me where I did wrong?

Thanks in advance!

CJ Chang
  • 325
  • 4
  • 12

1 Answers1

1

Use double quote in the predicate resolved the syntax error.

CJ Chang
  • 325
  • 4
  • 12
  • The problem is not in fact your XQuery syntax, it is the fact that the command line requires certain characters to be escaped. – Michael Kay Aug 15 '23 at 20:30