Hi Vikas,

What version of MarkLogic are you using?

You refer to CQ (did you mean QC?) and then mention that you are sending the 
requests using curl. I'm not quite clear on your process. Are you saying that 
validation is working correctly when you run in QC, but that it is incorrect 
when you send a request with curl?

Could you send the curl request that you're using?

Dave.

--
Dave Cassel
Developer Community Manager
MarkLogic Corporation<http://www.marklogic.com/>


From: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Reply-To: MarkLogic Developer Discussion 
<[email protected]<mailto:[email protected]>>
Date: Tuesday, October 28, 2014 at 3:30 AM
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: [MarkLogic Dev General] import schema is pointing to wrong schema

Hi

I am using validate Strict to validate  content using schema. I have loaded 
three schema to schema database. Each Schema or xml  does not contain any 
namespace.

When in am validating my content using schema in CQ it is working perfectly .

import schema "" at "/1.xsd";
let $content = ”xml here”
return
try
{
  validate strict {$content}
}
catch($exception){
   fn:error((),"FAILED_BY_SCHEMA",$exception/error:format-string/fn:string(.))
}

When I am changing above code to “/2.xsd ” content is validating perfectly 
against “/2.xsd” in CQ.

I  have registered 3 rest service for 3 types of XSD validation  using 
transforms rest api and  try to validate my content .

when I am sending http request for validating against “1.xsd” ,content is 
validated against the latest schema which I have run through CQ.

Suppose  I have run above code for “1.xsd” in CQ and when I am sending http 
request for validation of “1.xml” it is working fine it is  validating against 
“1.xsd” which is expected.
But when I am  sending http request for “2.xml ” still it is pointing to 
“1.xsd” which is unexpected since I have run latest code in CQ for “1.xsd” 
only. Once I will run code for “2.xsd” in CQ and again sent http request for 
validating “2.xml ” it will point to “2.xsd” which is expected.

Is there any caching mechanism is going on while pointing to schema. I am 
sending  my HTTP requesting using curl.
Regards,
Vikas Singh



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

Reply via email to