You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/home/workspace/ contains java classes (including main) and data.xml
/home/workspace/schemas/ contains schema.rng and schema2.rng
I have the following Java code that validates a .rng file against a .xml file.
public boolean validate() {
InputSource xmlFileInputSource = new InputSource(new FileInputStream("data.xml"));
ValidationDriver validationDriver = new ValidationDriver();
InputSource xmlSchemaInputSource = new InputSource(new FileInputStream("./schemas/schema.rng"));
validationDriver.loadSchema(xmlSchemaInputSource);
return validationDriver.validate(xmlFileInputSource);
}
schema.rng contains a link to another rng file.
<include href="schema2.rng" />
Instead of searching for schema2.rng file in the folder of schema.rng, Jing searches the file schema2.rng in the folder the program is run and thus results in FileNotFoundException in /home/workspace/. The search path should be /home/workspace/schemas, where schema.rng file is located.
The text was updated successfully, but these errors were encountered:
My workspace looks like this:
/home/workspace/ contains java classes (including main) and data.xml
/home/workspace/schemas/ contains schema.rng and schema2.rng
I have the following Java code that validates a .rng file against a .xml file.
schema.rng contains a link to another rng file.
<include href="schema2.rng" />
Instead of searching for schema2.rng file in the folder of schema.rng, Jing searches the file schema2.rng in the folder the program is run and thus results in FileNotFoundException in /home/workspace/. The search path should be /home/workspace/schemas, where schema.rng file is located.
The text was updated successfully, but these errors were encountered: