The validate expression in XQuery is what you want.  It will validate against 
in-scope schemas.  THe syntax is:

validate { expr }

where expr is some XML to validate.  It returns the XML if it is valid, and 
throws an exception if it is not valid.  For more details, see page 37 of the 
XQuery Ref guide (http://developer.marklogic.com/pubs/4.1/books/xquery.pdf).

-Danny 

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Pradeep Maddireddy
Sent: Monday, April 19, 2010 9:00 AM
To: General
Subject: [MarkLogic Dev General] Validate a document against a schema while 
uploading document

Hi..!

  I need to upload an xml file from file system into marklogic, but
before uploading I need to validate it against a schema. Can some one
tell me the function to be used to validate a document against a
schema.

Thanks
Pradeep Maddireddy
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to