On Mon, 17 Sep 2012 02:15:04 -0700, [email protected]
<[email protected]> wrote:
> Hi
>
> I am validating the XML’s using the schema I stored in the schema
> database.
>
> Validation works fine. But, I am getting only one error when xml is not
> valid.
>
> Currently I am looping through all nodes of an XML and validating them
> with the XSD which is giving me all errors. But this takes more time and
> exceeds time limit some times.
>
> Is there any way to get all errors at a time?
>
> Thanks and Regards,
>
> Gnanaprakash Bodireddy
You can either use the xdmp:validate builtin or
the validate full extension expression.
e.g.
xdmp:validate( $node, "strict")
or
validate full { $node }
xdmp:validate will return you an XML
node reporting any and all errors it found.
validate full will either return the node back
or a master error with all the found errors
as data inside it.
For certain kinds of errors you are apt to
get cascading errors that aren't really
separate problems, or to have actual
errors be skipped as it tries to resync.
//Mary
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general