-
Notifications
You must be signed in to change notification settings - Fork 311
Open
Labels
Description
I am trying to validate a simple document in the terminal (with the nu.validator.client.SimpleCommandLineValidator). Passing a schema URL starting with https always fails.
Here is a simple input document:
<?xml version="1.0" encoding="utf-8"?>
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
<title>Title</title>
<para>Some text</para>
</section>And the command:
java -cp vnu.jar nu.validator.client.SimpleCommandLineValidator \
--schema https://docbook.org/xml/5.1/rng/docbook.rng \
--xml \
--stdout \
--format json \
file.xmlThis results in error: The "--schema" option requires a URL for a schema.
Looking at the source code, it seems that this restriction is hard coded.
| if (!schemaUrl.startsWith("http:")) { |
Running the Vnu validator as a web service, you actually can specify a schema with https. Is there any particular reason for this restriction? http is discouraged for many years now. And I don't see any workaround at this moment (besides providing some kind of proxy from localhost).
Any help would be greatly appreciated. Thanks!