Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add validate subcommand #4397

Open
1 task
jelovirt opened this issue Feb 11, 2024 · 3 comments · May be fixed by #4400
Open
1 task

Add validate subcommand #4397

jelovirt opened this issue Feb 11, 2024 · 3 comments · May be fixed by #4400
Labels
feature New feature or request

Comments

@jelovirt
Copy link
Member

jelovirt commented Feb 11, 2024

Description

Add dedicated subcommand for validation. The process will run pre-processing to discover error or warnings. Instead of producing output, it would only log issues and return with non-zero exit code.

There will be a new extension point that plug-ins can use to run custom Ant targets for additional validation. If there are multiple plugins that use the extension point, then multiple validation steps are run in some order. Each should just log warnings and errors, not product any output.

The validation subcommand could also produce a list of all error and warnings in some format. However, you can output the normal log into an XML file or using a custom build listener you can generate any output you want.

Example uses

$ dita validate -i userguide.ditamap
$ dita validate -i userguide.ditamap --processing-mode=strict

Open items

  • Should the default processing mode be strict or lax? For conversion the default is lax.
@jelovirt jelovirt added the feature New feature or request label Feb 11, 2024
@jelovirt
Copy link
Member Author

My initial preference would be to use the same processing mode for validation as for conversion. If you want strict processing, it's easy to switch it on. However, for validation it feels the default should maybe be strict 🤷🏽

@jelovirt jelovirt linked a pull request Feb 11, 2024 that will close this issue
@jelovirt jelovirt linked a pull request Feb 11, 2024 that will close this issue
@fwegmann
Copy link

fwegmann commented Mar 7, 2024

I would agree: If you use DITA-OT for validation purposes, then there is the express intention of checking sources thoroughly. So that should indeed be the default.

@chrispy-snps
Copy link
Contributor

My first thought was also that validation should default to the same behavior as transformation, just a "read-only" version of it. But then I realized that from a user perspective, having a validator default to "relaxed validation" is counter-intuitive. So I also agree that validate should default to strict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

3 participants