How to change current folder for validation

Questions about XML that are not covered by the other forums should go here.
Posts: 1
Joined: Fri Dec 30, 2016 2:14 am

How to change current folder for validation

Post by gqqnbig » Fri Dec 30, 2016 3:16 am

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.

This XML has schemaLocation=" 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?

Posts: 2580
Joined: Tue May 17, 2005 4:01 pm

Re: How to change current folder for validation

Post by adrian » Fri Dec 30, 2016 11:17 am


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.

Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger

Post Reply