Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

No support for using the CLI/jar checker to validate DocBook documents? #1823

Copy link
Copy link
@frankarensmeier

Description

@frankarensmeier
Issue body actions

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.xml

This 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!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.