-
Notifications
You must be signed in to change notification settings - Fork 42
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
Outdated API Documentation for 1.5.0 #130
Comments
@SemikolonDEV I also experienced the same thing as you did. After some research by looking into the source code, I found out how we can set the Processor parameter to the build function: You can use de.kosit.validationtool.impl.xml.ProcessorProvider.getProcessor() to get a processor. import static de.kosit.validationtool.config.ConfigurationBuilder.*;
import de.kosit.validationtool.api.Configuration;
import java.net.URI;
import java.nio.file.Path;
public class MyValidator {
public static void main(String[] args) {
Configuration config = Configuration.create().name("myconfiguration")
.with(scenario("firstScenario")
.match("//myNode")
.validate(schema("Sample Schema").schemaLocation(URI.create("simple.xsd")))
.validate(schematron("my rules").source("myRules.xsl"))
.with(report("my report").source("report.xsl")))
.with(fallback().name("default-report").source("fallback.xsl"))
.useRepository(Paths.get("/opt/myrepository"))
.build(ProcessorProvider.getProcessor());
Check validator = new DefaultCheck(config);
// .. run your checks
}
} |
Thanks @wustudent , your comment was very helpful for me as it was the first time I use the KoSIT validator. I am writing the update code, which also worked for me:
Note:
|
The Description on https://github.com/itplr-kosit/validator/blob/main/docs/api.md is outdated and should be updated.
The code examples do not work with current version.
The text was updated successfully, but these errors were encountered: