[MarkLogic Dev General] Validate a document against a schema
while uploading document
Danny Sokolsky
Danny.Sokolsky at marklogic.com
Mon Apr 19 09:06:28 PDT 2010
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: general-bounces at developer.marklogic.com [mailto:general-bounces at developer.marklogic.com] 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
General at developer.marklogic.com
http://xqzone.com/mailman/listinfo/general
More information about the General
mailing list