Page 1 of 1

How to change current folder for validation

Posted: Fri Dec 30, 2016 3:16 am
by gqqnbig
I have some XML text and it's not a file. I create new document in Oxygen and paste the text in. I validate the document, but Oxygen says "Failed to read schema document..."

See the attached screenshoot.
Image

This XML has schemaLocation="http://www.meridianlink.com/CLF VEHICLE_LOAN.xsd ...". If I understand correctly, it's a relative URI. I think Oxygen uses the current directory, which is C:\ in the screenshoot, as the base URI.

Is it possible to specify the current directoy, eg. change it from C:\ to D:\, when validating the document?

Re: How to change current folder for validation

Posted: Fri Dec 30, 2016 11:17 am
by adrian
Hi,

Oxygen uses the current directory at the time the Untitled document is created. That means the Untitled document has that location.
So, either have a document opened from the desired directory, when you create an untitled document, so that the new document is created in that location, or create the document (named) directly where you need it to be.
If you want a well established location for the file, you should save it next to the schema. Then you can validate it and the schema will be found.

The alternative is to create an XML catalog that redirects the schema URI or namespace to your schema location.

Regards,
Adrian