Dear all,
this question triggers a dejavu in my head and I'm pretty sure this has been discussed some time ago so I'm not sure why it strikes back at us ...
With the latest snapshot (but with 8.4.4 it's the same) downloaded just few minutes ago I start the basehttp server.
Then I add the foolowing RestXQ to the restxq.xqm file:
declare
%rest:path("/testxsd")
%rest:POST("{$body}")
%rest:consumes("application/xml")
function page:testxsd($body){
validate:xsd-info($body, "xsd.xsd")
};
I store the following dummy xsd as xsd.xsd in the webapp folder:
<?xml version="1.0"?>
<xs:schema xmlns:xs="
http://www.w3.org/2001/XMLSchema">
<xs:element name="a"/>
</xs:schema>
I invoke the restxq with:
curl -vd "<a/>"
http://localhost:5000/testxsd -H "Content-type:application/xml"
Getting back the following error:
Error 400 Stopped at /tmp/basex/webapp/restxq.xqm, 12/20:
[bxerr:BXVA0002] Validation could not be started: Resource "/tmp/basex/POST.xml (No such file or directory)" not found.</title>
This happens no matter what xml and what xsd is used. If I change $body with <a/> in the call to validate:xsd-info everything works smoothly ...
Any ideas?
Thanks,
Marco.