HI.

One option is to import all of the  schema with a target namespace and then
inject the nsamespace into the document dynamically at the time of testing.

for do in doc
- based on some rule, inject a particular namespace into each document
- validate this modified version(which will use the proper schema based on
the targetNamespace matchini the injected namespace.

Kind Regards,
David Ennis



Kind Regards,
David Ennis


David Ennis
*Content Engineer*

[image: HintTech]  <http://www.hinttech.com/>
Mastering the value of content
creative | technology | content

Delftechpark 37i
2628 XJ Delft
The Netherlands
T: +31 88 268 25 00
M: +31 63 091 72 80

[image: http://www.hinttech.com] <http://www.hinttech.com>
<https://twitter.com/HintTech>  <http://www.facebook.com/HintTech>
<http://www.linkedin.com/company/HintTech>

On 26 September 2014 02:56, <[email protected]> wrote:

>  Hi All,
>
>  What should be the best way to schema validate of multiple documents. We
> have 100+ schema of inbound sources and the data is not tagged with any
> namespace.
>
>  Earlier I used to write separate module xquery file importing one schema
> at a time and then calling it from main module. The approach seems not to
> be scalable with 100+ sources since import schema part of below query can't
> be made dynamic. Also I am thinking to modify inbound source files to
> incorporate with schema namespace as last option.
>
>  Please advise.
>
>  Thanks
> Abhishek
>
> -----------------------------------------------------------------------------------------------------------------
>
>  xquery version "1.0-ml";
>
>  module namespace val= "http://test.com";;
>
>  import schema default element namespace "" at
> "/resources/xsd/source1.xsd";
>
>  declare function val:validate-document ($xml) {
>     validate strict {
>         document{$xml}
>     }
> };
>
>
> -----------------------------------------------------------------------------------------------------------------
>  This e-mail and any files transmitted with it are for the sole use of the
> intended recipient(s) and may contain confidential and privileged
> information. If you are not the intended recipient(s), please reply to the
> sender and destroy all copies of the original message. Any unauthorized
> review, use, disclosure, dissemination, forwarding, printing or copying of
> this email, and/or any action taken in reliance on the contents of this
> e-mail is strictly prohibited and may be unlawful. Where permitted by
> applicable law, this e-mail and other e-mail communications sent to and
> from Cognizant e-mail addresses may be monitored.
>
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
>
>
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to