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

Consider documenting difference between two usages #1423

Open
oliviercailloux opened this issue Sep 8, 2022 · 0 comments
Open

Consider documenting difference between two usages #1423

oliviercailloux opened this issue Sep 8, 2022 · 0 comments
Labels

Comments

@oliviercailloux
Copy link

Is your feature request related to a problem? Please describe.
I see (at least) two ways of using Vnu as an embedded library.

  • At SO you gave a simple way of using the validator directly through jing (as embedded in vnu.jar), that boils down to a few simple lines of code. This seems to work.
  • OTOH, “unwrapping” the code from SimpleDocumentValidator leads to some apparently much more complicated usage, involving setting system properties, using cascading schema instances and validators and xml readers interacting with a SourceCode instance, …

Describe the solution you'd like
Please document briefly how these two approaches differ, in view of providing an as-correct-as-possible validation of (X)HTML documents.

Describe alternatives you've considered
#71 is about extending the README about instructions for using the validator as an embedded library. I had initially posted the current question in that thread. However, my request (slightly) differs as I do not want a nice and clear documentation to appear in the README (which I believe you might not have time to provide anytime soon), but just a bit of targeted help in view of me developing a wrapper and making sure it works correctly. Therefore, I hope that it is more appropriate to post my question as a new thread in order not to hijack the one about the README. I do not want to mislead users by letting them believe that invalid documents are valid, so I want to make sure that I am calling the library correctly.

Additional context
I intend to publish this wrapper as an open source project so that others can benefit. The wrapper I intend to build differs from the EmbeddedValidator one (#1265) on two aspects.

  • It intends to provide an approach compatible with SAX for easy combination with code that validates other kinds of documents.
  • It intends to provide a more programmer friendly approach to validation (a need that is highlighted here).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants