Merge branch 'release/1.6.x' into 'main'

Update links to source code to current locations

See merge request kosit/validator!88
This commit is contained in:
Philip Helger 2025-11-07 13:00:53 +01:00
commit 0e944616a5
130 changed files with 14419 additions and 17634 deletions

View file

@ -11,7 +11,7 @@ before_script:
cache: cache:
# Change the cache key if major dependencies change # Change the cache key if major dependencies change
key: constant151 key: constant160
paths: paths:
- .m2/repository - .m2/repository
@ -37,18 +37,9 @@ cache:
rules: rules:
- if: $CI_PIPELINE_SOURCE == "schedule" - if: $CI_PIPELINE_SOURCE == "schedule"
# Note: image "maven:3-eclipse-temurin-8-alpine" does not work!
java-8:
extends: .java
image: $CI_REGISTRY_IMAGE/maven:3-jdk-8
java-8-openj9:
extends: .java_extended
image: $CI_REGISTRY_IMAGE/maven:3-jdk-8-openj9
java-11: java-11:
extends: .java extends: .java
image: $CI_REGISTRY_IMAGE/maven:3-eclipse-temurin-11-alpine image: maven:3-eclipse-temurin-11-alpine
needs: [ ] needs: [ ]
script: script:
- mvn $MAVEN_CLI_OPTS $BUILD_PROPS $CI_JOB_TIMESTAMP install - mvn $MAVEN_CLI_OPTS $BUILD_PROPS $CI_JOB_TIMESTAMP install
@ -65,37 +56,40 @@ java-11:
java-11-openj9: java-11-openj9:
extends: .java_extended extends: .java_extended
image: $CI_REGISTRY_IMAGE/maven:3-jdk-11-openj9 image: maven:3-jdk-11-openj9
java-17: java-17:
extends: .java extends: .java
image: $CI_REGISTRY_IMAGE/maven:3-eclipse-temurin-17-alpine image: maven:3-eclipse-temurin-17-alpine
java-21: java-21:
extends: .java extends: .java
image: $CI_REGISTRY_IMAGE/maven:3-eclipse-temurin-21-alpine image: maven:3-eclipse-temurin-21-alpine
java-24: java-24:
extends: .java_extended extends: .java_extended
image: $CI_REGISTRY_IMAGE/maven:3-eclipse-temurin-24-alpine image: maven:3-eclipse-temurin-24-alpine
java-25:
extends: .java
image: maven:3-eclipse-temurin-25-alpine
deploy: deploy:
stage: deploy stage: deploy
image: $CI_REGISTRY_IMAGE/maven:3-eclipse-temurin-11-alpine image: maven:3-eclipse-temurin-11-alpine
needs: needs:
- job: java-11 - job: java-11
script: script:
- export PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) - export PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
- mvn $MAVEN_CLI_OPTS deploy:deploy-file -Dfile=target/validationtool-${PROJECT_VERSION}.zip -DgroupId=kosit -DartifactId=validator -Dclassifier="distribution" -Dversion=${PROJECT_VERSION} -Dpackaging=zip -DrepositoryId="gitlab-maven" -Durl=https://projekte.kosit.org/api/v4/projects/7/packages/maven - mvn $MAVEN_CLI_OPTS deploy:deploy-file -Dfile=target/validator-${PROJECT_VERSION}.zip -DgroupId=kosit -DartifactId=validator -Dclassifier="distribution" -Dversion=${PROJECT_VERSION} -Dpackaging=zip -DrepositoryId="gitlab-maven" -Durl=https://projekte.kosit.org/api/v4/projects/7/packages/maven
- mvn $MAVEN_CLI_OPTS deploy:deploy-file -Dfile=target/validationtool-${PROJECT_VERSION}.jar -DgroupId=kosit -DartifactId=validator -Dversion=${PROJECT_VERSION} -Dpackaging=jar -DrepositoryId="gitlab-maven" -Durl=https://projekte.kosit.org/api/v4/projects/7/packages/maven - mvn $MAVEN_CLI_OPTS deploy:deploy-file -Dfile=target/validator-${PROJECT_VERSION}.jar -DgroupId=kosit -DartifactId=validator -Dversion=${PROJECT_VERSION} -Dpackaging=jar -DrepositoryId="gitlab-maven" -Durl=https://projekte.kosit.org/api/v4/projects/7/packages/maven
- mvn $MAVEN_CLI_OPTS deploy:deploy-file -Dfile=target/validationtool-${PROJECT_VERSION}-javadoc.jar -DgroupId=kosit -DartifactId=validator -Dclassifier="javadoc" -Dversion=${PROJECT_VERSION} -Dpackaging=zip -DrepositoryId="gitlab-maven" -Durl=https://projekte.kosit.org/api/v4/projects/7/packages/maven - mvn $MAVEN_CLI_OPTS deploy:deploy-file -Dfile=target/validator-${PROJECT_VERSION}-javadoc.jar -DgroupId=kosit -DartifactId=validator -Dclassifier="javadoc" -Dversion=${PROJECT_VERSION} -Dpackaging=zip -DrepositoryId="gitlab-maven" -Durl=https://projekte.kosit.org/api/v4/projects/7/packages/maven
- mvn $MAVEN_CLI_OPTS deploy:deploy-file -Dfile=target/validationtool-${PROJECT_VERSION}-standalone.jar -DgroupId=kosit -DartifactId=validator -Dclassifier="standalone" -Dversion=${PROJECT_VERSION} -Dpackaging=jar -DrepositoryId="gitlab-maven" -Durl=https://projekte.kosit.org/api/v4/projects/7/packages/maven - mvn $MAVEN_CLI_OPTS deploy:deploy-file -Dfile=target/validator-${PROJECT_VERSION}-standalone.jar -DgroupId=kosit -DartifactId=validator -Dclassifier="standalone" -Dversion=${PROJECT_VERSION} -Dpackaging=jar -DrepositoryId="gitlab-maven" -Durl=https://projekte.kosit.org/api/v4/projects/7/packages/maven
- mvn $MAVEN_CLI_OPTS deploy:deploy-file -Dfile=target/validationtool-${PROJECT_VERSION}-java8-standalone.jar -DgroupId=kosit -DartifactId=validator -Dclassifier="java8-standalone" -Dversion=${PROJECT_VERSION} -Dpackaging=jar -DrepositoryId="gitlab-maven" -Durl=https://projekte.kosit.org/api/v4/projects/7/packages/maven - mvn $MAVEN_CLI_OPTS deploy:deploy-file -Dfile=target/validator-${PROJECT_VERSION}-sources.jar -DgroupId=kosit -DartifactId=validator -Dclassifier="sources" -Dversion=${PROJECT_VERSION} -Dpackaging=jar -DrepositoryId="gitlab-maven" -Durl=https://projekte.kosit.org/api/v4/projects/7/packages/maven
- mvn $MAVEN_CLI_OPTS deploy:deploy-file -Dfile=target/validationtool-${PROJECT_VERSION}-sources.jar -DgroupId=kosit -DartifactId=validator -Dclassifier="sources" -Dversion=${PROJECT_VERSION} -Dpackaging=jar -DrepositoryId="gitlab-maven" -Durl=https://projekte.kosit.org/api/v4/projects/7/packages/maven
when: manual when: manual
deploy-snapshot: deploy-snapshot:
extends: java-8 extends: java-11
script: script:
- mvn $MAVEN_CLI_OPTS_CENTRAL -P release-snapshot deploy - mvn $MAVEN_CLI_OPTS_CENTRAL -P release-snapshot deploy
@ -116,7 +110,7 @@ create-build-image:
owasp-check: owasp-check:
extends: .java extends: .java
image: $CI_REGISTRY_IMAGE/maven:3-eclipse-temurin-11-alpine image: maven:3-eclipse-temurin-11-alpine
needs: [ ] needs: [ ]
script: script:
- mvn $MAVEN_CLI_OPTS $BUILD_PROPS $CI_JOB_TIMESTAMP validate -Powasp-check - mvn $MAVEN_CLI_OPTS $BUILD_PROPS $CI_JOB_TIMESTAMP validate -Powasp-check

View file

@ -5,13 +5,43 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased
## 1.6.0 - 2025-11-07
### Added
- (CORE) [GitHub #127](https://github.com/itplr-kosit/validator/issues/127) New API method `Result.getCustomFailedAsserts()` to access failed asserts with custom error levels
### Fixed
- (DOC) [GitHub PR#166](https://github.com/itplr-kosit/validator/pull/166) Fixed broken links in `docs/api.md`
### Changed
- (CORE) Migration from javax to jakarta xml bind
- (DOC) [GitHub PR#132](https://github.com/itplr-kosit/validator/pull/132) Updated the link to the example Validator scenario configuration
- (BUILD) Support for *building and compilation* is restricted to the following Java versions:
- Java 11: any version ≥ 11.0.23
- Java 12 to 16 will not work
- Java 17: any version ≥ 17.0.11
- Java 18 to 20 will not work
- Any version from Java 21 onwards will work
- The reason for this is the usage of the `-proc:full` compiler parameter which in turn is needed for Lombok usage in JDK 23+.
### Removed
- (CORE) java 8 support. new default jdk 11
## 1.5.2 - 2025-09-01 ## 1.5.2 - 2025-09-01
### Fixed ### Fixed
- (BUILD) [#148](https://projekte.kosit.org/kosit/validator/-/issues/148): Regression that due to renaming from `validationtool` to `validator` the distribution zip did not contain all jars anymore - (BUILD) [#148](https://projekte.kosit.org/kosit/validator/-/issues/148) Regression that due to renaming from `validationtool` to `validator` the distribution zip did not contain all jars anymore
# 1.5.1 - 2025-09-01 ## 1.5.1 - 2025-09-01
### Fixed ### Fixed
@ -70,7 +100,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#80](https://github.com/itplr-kosit/validator/issues/80) using classloader to initialize jaxb context (to support - [#80](https://github.com/itplr-kosit/validator/issues/80) using classloader to initialize jaxb context (to support
usage in OSGi usage in OSGi
environments) environments)
- [#75] (<https://github.com/itplr-kosit/validator/issues/75>) Improve logging on invalid documents - [#75](https://github.com/itplr-kosit/validator/issues/75) Improve logging on invalid documents
## 1.4.1 ## 1.4.1
@ -112,7 +142,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- `getFailedAsserts()` and `isSchematronValid()` - `getFailedAsserts()` and `isSchematronValid()`
in [DefaultResult.java](https://github.com/itplr-kosit/validator/blob/master/src/main/java/de/kosit/validationtool/impl/DefaultResult.java) in [DefaultResult.java](https://github.com/itplr-kosit/validator/blob/main/src/main/java/de/kosit/validationtool/impl/DefaultResult.java)
do not reflect actual schematron validation result do not reflect actual schematron validation result
- processing aborts on schematron execution errors (e.g. errors within schematron logic). The validator now generates a - processing aborts on schematron execution errors (e.g. errors within schematron logic). The validator now generates a
report in such cases. report in such cases.
@ -160,7 +190,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added ### Added
- Provide access to schematron result - Provide access to schematron result
through [Result.java](https://github.com/itplr-kosit/validator/blob/master/src/main/java/de/kosit/validationtool/api/Result.java) through [Result.java](https://github.com/itplr-kosit/validator/blob/main/src/main/java/de/kosit/validationtool/api/Result.java)
- *Result#getFailedAsserts()* returns a list of failed asserts found by schematron - *Result#getFailedAsserts()* returns a list of failed asserts found by schematron
- *Result#isSchematronValid()* convinience access to evaluate whether schematron was processed without any * - *Result#isSchematronValid()* convinience access to evaluate whether schematron was processed without any *
FailedAsserts* FailedAsserts*

2
NOTICE
View file

@ -2,4 +2,4 @@ KoSIT XML Validator
Copyright 2017-2025 Koordinierungsstelle für IT-Standards (KoSIT) Copyright 2017-2025 Koordinierungsstelle für IT-Standards (KoSIT)
This product includes software developed by This product includes software developed by
Koordinierungsstelle für IT-Standards (<https://www.xoev.de/>). Koordinierungsstelle für IT-Standards (<https://xeinkauf.de/>).

View file

@ -32,7 +32,7 @@ Here are some public validation configurations:
* Validation Configuration for [XRechnung](https://xeinkauf.de/xrechnung/): * Validation Configuration for [XRechnung](https://xeinkauf.de/xrechnung/):
* Source code is available on [GitHub](https://github.com/itplr-kosit/validator-configuration-xrechnung) * Source code is available on [GitHub](https://github.com/itplr-kosit/validator-configuration-xrechnung)
* [Releases](https://github.com/itplr-kosit/validator-configuration-xrechnung/releases) can also be downloaded * [Releases](https://github.com/itplr-kosit/validator-configuration-xrechnung/releases) can also be downloaded
* Validation Configuration for [Peppol BIS Billing](docs.peppol.eu/poacc/billing/3.0/): * Validation Configuration for [Peppol BIS Billing](https://docs.peppol.eu/poacc/billing/3.0/):
* Source code is available on [GitHub](https://github.com/itplr-kosit/validator-configuration-bis) * Source code is available on [GitHub](https://github.com/itplr-kosit/validator-configuration-bis)
* [Releases](https://github.com/itplr-kosit/validator-configuration-bis/releases) can also be downloaded * [Releases](https://github.com/itplr-kosit/validator-configuration-bis/releases) can also be downloaded
* Validation Configuration for [XGewerbeanzeige](https://xgewerbeanzeige.de/) * Validation Configuration for [XGewerbeanzeige](https://xgewerbeanzeige.de/)
@ -105,9 +105,8 @@ The [daemon documentation](./docs/daemon.md) shows more usage details and furthe
The Validator distribution contains the following artifacts: The Validator distribution contains the following artifacts:
1. **validator-`<version>`.jar**: Java library for embedded use within an application 1. **validator-`<version>`.jar**: Java library for embedded use within an application
1. **validator-`<version>`-standalone.jar**: Uber-JAR for standalone usage containing all dependencies in one jar file. This file comes with JAXB *embedded* and can be used with Java 8 and Java >= 11) 1. **validator-`<version>`-standalone.jar**: Uber-JAR for standalone usage containing all dependencies in one jar file. This file comes with JAXB *embedded* and can be used with Java >= 11)
1. **validator-`<version>`-java8-standalone.jar**: Uber-JAR for standalone usage with Java JDK 8 containing all dependencies in one jar file. This file file *does not* contain JAXB and depends on the bundled version of the JDK. 1. **libs/**: directory containing all (incl. optional) dependencies of the validator
1. **libs/***: directory containing all (incl. optional) dependencies of the validator
## Installation ## Installation

View file

@ -2,4 +2,4 @@
## German ## German
In seiner 23. Sitzung hat der [IT-Planungsrat](https://www.it-planungsrat.de) mit [Beschluss 2017/22 (6a)](https://www.it-planungsrat.de/SharedDocs/Sitzungen/DE/2017/Sitzung_23.html?pos=3) die [Koordinierungsstelle für IT-Standards (KoSIT)](https://www.xoev.de/) im Rahmen des Betriebs des Standards XRechnung mit der dauerhaften„…Bereitstellung eines Moduls zur Konformitätsprüfung elektronischer Rechnungen als offene Referenzimplementierung sowie …“ aller zugehöriger Artefakte beauftragt. Im Rahmen dieser Beauftragung wurde die hier bereitgestellte Software "Prüftool" (Engl. Validator) entwickelt und (vor-) konfiguriert. In seiner 23. Sitzung hat der [IT-Planungsrat](https://www.it-planungsrat.de) mit [Beschluss 2017/22 (6a)](https://www.it-planungsrat.de/SharedDocs/Sitzungen/DE/2017/Sitzung_23.html?pos=3) die [Koordinierungsstelle für IT-Standards (KoSIT)](https://xeinkauf.de/) im Rahmen des Betriebs des Standards XRechnung mit der dauerhaften„…Bereitstellung eines Moduls zur Konformitätsprüfung elektronischer Rechnungen als offene Referenzimplementierung sowie …“ aller zugehöriger Artefakte beauftragt. Im Rahmen dieser Beauftragung wurde die hier bereitgestellte Software "Prüftool" (Engl. Validator) entwickelt und (vor-) konfiguriert.

View file

@ -48,12 +48,13 @@ java -jar validator-<version>-standalone.jar -s "NAME1=<scenario-config-file1>"
Besides the obvious functionality of validating, the cli provides additional functionality to customize the processing: Besides the obvious functionality of validating, the cli provides additional functionality to customize the processing:
|name | option | description | | - | - | - | | [Daemon mode](daemon.md) | `-D` | Starts the validator in daemon mode as an HTTP service | | | name | option | description |
print mode | `-p` | Print the report to stdout | | extract html | `-h` | Extracts any html blocks within the report and saves the content to | - | - | - |
the filesystem. Note: the file name is derived from the node name the html appears in | | print memory stats | `-m` | Prints some memory | [Daemon mode](daemon.md) | `-D` | Starts the validator in daemon mode as an HTTP service |
usage information. Mainly for debugging purposes on processing huge xml files | | check assertions | `-c <file>` | Check assertions on the | print mode | `-p` | Print the report to stdout |
generated reports. This is mainly useful for scenario developers. Ask KoSIT for documentation, if you want to use this feauture | | extract html | `-h` | Extracts any html blocks within the report and saves the content to the filesystem. Note: the file name is derived from the node name the html appears in |
| print memory stats | `-m` | Prints some memory usage information. Mainly for debugging purposes on processing huge xml files |
| check assertions | `-c <file>` | Check assertions on the generated reports. This is mainly useful for scenario developers. Ask KoSIT for documentation, if you want to use this feauture |
## Return codes ## Return codes

109
pom.xml
View file

@ -6,7 +6,7 @@
<groupId>org.kosit</groupId> <groupId>org.kosit</groupId>
<artifactId>validator</artifactId> <artifactId>validator</artifactId>
<version>1.5.3-SNAPSHOT</version> <version>1.6.1-SNAPSHOT</version>
<description>KoSIT XML Validator against XSD and Schematron based on defined scenarios.</description> <description>KoSIT XML Validator against XSD and Schematron based on defined scenarios.</description>
<developers> <developers>
@ -15,13 +15,13 @@
<id>fabian.buettner</id> <id>fabian.buettner</id>
<name>Fabian Büttner</name> <name>Fabian Büttner</name>
<organization>KoSIT</organization> <organization>KoSIT</organization>
<organizationUrl>http://www.xoev.de</organizationUrl> <organizationUrl>https://xoev.de/</organizationUrl>
</developer> </developer>
<developer> <developer>
<id>renzo.kottmann</id> <id>renzo.kottmann</id>
<name>Renzo Kottmann</name> <name>Renzo Kottmann</name>
<organization>KoSIT</organization> <organization>KoSIT</organization>
<organizationUrl>http://www.xeinkauf.de</organizationUrl> <organizationUrl>https://xeinkauf.de</organizationUrl>
<roles> <roles>
<role>Product Owner</role> <role>Product Owner</role>
</roles> </roles>
@ -42,13 +42,15 @@
<version.commons-io>2.20.0</version.commons-io> <version.commons-io>2.20.0</version.commons-io>
<version.commons-lang>3.18.0</version.commons-lang> <version.commons-lang>3.18.0</version.commons-lang>
<version.jacoco>0.8.13</version.jacoco> <version.jacoco>0.8.13</version.jacoco>
<version.jaxb>2.3.9</version.jaxb> <version.jaxb-api>4.0.2</version.jaxb-api>
<version.lombok>1.18.38</version.lombok> <version.jaxb-impl>4.0.5</version.jaxb-impl>
<version.lombok>1.18.42</version.lombok>
<version.mockito>4.11.0</version.mockito> <version.mockito>4.11.0</version.mockito>
<version.owasp-dependency-check>10.0.4</version.owasp-dependency-check> <version.owasp-dependency-check>10.0.4</version.owasp-dependency-check>
<version.rest-assured>5.5.5</version.rest-assured> <version.rest-assured>5.5.5</version.rest-assured>
<version.saxon-he>12.8</version.saxon-he> <version.saxon-he>12.8</version.saxon-he>
<version.slf4j>2.0.17</version.slf4j> <version.slf4j>2.0.17</version.slf4j>
<version.jaxb-maven-plugin>4.0.11</version.jaxb-maven-plugin>
</properties> </properties>
<repositories> <repositories>
@ -116,9 +118,14 @@
<dependency> <dependency>
<groupId>org.glassfish.jaxb</groupId> <groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId> <artifactId>jaxb-runtime</artifactId>
<version>${version.jaxb}</version> <version>${version.jaxb-impl}</version>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>${version.jaxb-api}</version>
</dependency>
<dependency> <dependency>
<groupId>org.assertj</groupId> <groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId> <artifactId>assertj-core</artifactId>
@ -154,7 +161,6 @@
<version>1.0.2</version> <version>1.0.2</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
@ -235,6 +241,16 @@
<requireMavenVersion> <requireMavenVersion>
<version>[3.3.9,)</version> <version>[3.3.9,)</version>
</requireMavenVersion> </requireMavenVersion>
<requireJavaVersion>
<!-- Required for "-proc:full" required for Lombok:
Any Java 11 (LTS) >= 11.0.23
No Java 12 to 16
Any Java 17 (LTS) >= 17.0.11
No Java 18 to 20
Any Java 21 or higher
-->
<version>[11.0.23,12),[17.0.11,18),[21,)</version>
</requireJavaVersion>
</rules> </rules>
</configuration> </configuration>
</execution> </execution>
@ -245,9 +261,13 @@
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.14.0</version> <version>3.14.0</version>
<configuration> <configuration>
<source>1.8</source> <release>11</release>
<target>1.8</target>
<encoding>UTF-8</encoding> <encoding>UTF-8</encoding>
<!-- This is required for Lombok only since JDK 23
Was backported to 17.0.11 and 11.0.23.
See: https://inside.java/2024/06/18/quality-heads-up/
-->
<proc>full</proc>
</configuration> </configuration>
</plugin> </plugin>
@ -283,44 +303,6 @@
</filters> </filters>
</configuration> </configuration>
</execution> </execution>
<execution>
<id>jdk8</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>java8-standalone</shadedClassifierName>
<artifactSet>
<excludes>
<exclude>org.glassfish.jaxb:jaxb-runtime</exclude>
<exclude>com.sun.istack:istack-commons-runtime</exclude>
<exclude>com.sun.xml.fastinfoset:FastInfoset</exclude>
<exclude>jakarta.activation:jakarta.activation-api</exclude>
<exclude>jakarta.xml.bind:jakarta.xml.bind-api</exclude>
<exclude>org.jvnet.staxex:stax-ex</exclude>
<exclude>org.glassfish.jaxb:txw2</exclude>
</excludes>
</artifactSet>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>de.kosit.validationtool.cmd.CommandLineApplication</mainClass>
</transformer>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
<exclude>**/module-info.class</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions> </executions>
</plugin> </plugin>
@ -350,9 +332,9 @@
<!-- Generate model classes --> <!-- Generate model classes -->
<plugin> <plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId> <groupId>org.jvnet.jaxb</groupId>
<artifactId>maven-jaxb2-plugin</artifactId> <artifactId>jaxb-maven-plugin</artifactId>
<version>0.15.3</version> <version>${version.jaxb-maven-plugin}</version>
<executions> <executions>
<execution> <execution>
<goals> <goals>
@ -370,20 +352,12 @@
</args> </args>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.jvnet.jaxb2_commons</groupId> <groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb2-basics</artifactId> <artifactId>jaxb-plugins</artifactId>
<version>0.13.1</version> <version>${version.jaxb-maven-plugin}</version>
</plugin> </plugin>
</plugins> </plugins>
</configuration> </configuration>
<dependencies>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>${version.jaxb}</version>
<optional>true</optional>
</dependency>
</dependencies>
</plugin> </plugin>
<!-- Integrate code coverage --> <!-- Integrate code coverage -->
@ -484,7 +458,7 @@
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId> <artifactId>exec-maven-plugin</artifactId>
<version>3.5.0</version> <version>3.6.2</version>
<executions> <executions>
<execution> <execution>
<id>run</id> <id>run</id>
@ -495,10 +469,15 @@
</execution> </execution>
</executions> </executions>
<configuration> <configuration>
<inheritIo>true</inheritIo>
<!-- have to catch exit codes, cause daemon throws 1 if shutdown is not proper-->
<successCodes>0,1</successCodes>
<executable>java</executable> <executable>java</executable>
<longClasspath>false</longClasspath> <longClasspath>false</longClasspath>
<async>true</async> <async>true</async>
<asyncDestroyOnShutdown>true</asyncDestroyOnShutdown> <asyncDestroyOnShutdown>true</asyncDestroyOnShutdown>
<cleanupDaemonThreads>false</cleanupDaemonThreads>
<arguments> <arguments>
<!--suppress MavenModelInspection --> <!--suppress MavenModelInspection -->
<argument>${jacocoFailsafe}</argument> <argument>${jacocoFailsafe}</argument>
@ -526,7 +505,7 @@
<target> <target>
<!-- schlafen um den Start des Daemon abzuwarten --> <!-- schlafen um den Start des Daemon abzuwarten -->
<sleep seconds="10" /> <sleep seconds="10" />
<echo>${jacoco.tcp.port}</echo> <echo>jacoco.tcp.port=${jacoco.tcp.port}</echo>
</target> </target>
</configuration> </configuration>
<executions> <executions>
@ -563,7 +542,7 @@
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
<version>3.11.2</version> <version>3.11.2</version>
<configuration> <configuration>
<source>8</source> <source>11</source>
<doclint>none</doclint> <doclint>none</doclint>
</configuration> </configuration>
<executions> <executions>
@ -707,7 +686,7 @@
<scm> <scm>
<connection>scm:git:https://github.com/itplr-kosit/validator.git</connection> <connection>scm:git:https://github.com/itplr-kosit/validator.git</connection>
<developerConnection>scm:git:https://projekte.kosit.org/kosit/validator.git</developerConnection> <developerConnection>scm:git:https://projekte.kosit.org/kosit/validator.git</developerConnection>
<tag>release/1.5.x</tag> <tag>release/1.6.x</tag>
<url>https://github.com/itplr-kosit/validator</url> <url>https://github.com/itplr-kosit/validator</url>
</scm> </scm>

View file

@ -5,12 +5,12 @@ the moment, this is generated within this module and copied to the actual source
location of the daemon. There are plans to modularize the whole validator source location of the daemon. There are plans to modularize the whole validator source
in the future so that this will be done by build process. in the future so that this will be done by build process.
This ui is built using [Docusaurus 2](https://docusaurus.io/), a modern static This ui is built using [Docusaurus 3](https://docusaurus.io/), a modern static
website generator. website generator.
### Local Development ### Local Development
``` ```shell
$ npm start $ npm start
``` ```
@ -19,8 +19,8 @@ Most changes are reflected live without having to restart the server.
### Build ### Build
``` ```shell
$ npm build $ npm run build
``` ```
This command generates static content into the `build` directory and must be This command generates static content into the `build` directory and must be

View file

@ -18,7 +18,7 @@ curl --location --request POST 'http://localhost:8080' \
--data-binary '@/target.xml' --data-binary '@/target.xml'
``` ```
* `java` (Apache HttpClient) * `Java` (Apache HttpClient)
```java ```java
HttpClient httpClient=HttpClientBuilder.create().build(); HttpClient httpClient=HttpClientBuilder.create().build();
@ -29,7 +29,7 @@ HttpClient httpClient=HttpClientBuilder.create().build();
System.out.println(IOUtils.toString(response.getEntity().getContent())); System.out.println(IOUtils.toString(response.getEntity().getContent()));
``` ```
* `javascript` * `JavaScript`
```javascript ```javascript
var myHeaders = new Headers(); var myHeaders = new Headers();

View file

@ -2,30 +2,79 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
# 1.5.0 ## 1.6.0
### Fixed
- (DOC) [GitHub PR#166](https://github.com/itplr-kosit/validator/pull/166) Fixed broken links in `docs/api.md`
### Changed
- (CORE) Migration from javax to jakarta xml bind
- (DOC) [GitHub PR#132](https://github.com/itplr-kosit/validator/pull/132) Updated the link to the example Validator scenario configuration
### Removed
- (CORE) java 8 support. new default jdk 11
## 1.5.2 - 2025-09-01
### Fixed
- (BUILD) [#148](https://projekte.kosit.org/kosit/validator/-/issues/148) Regression that due to renaming from `validationtool` to `validator` the distribution zip did not contain all jars anymore
## 1.5.1 - 2025-09-01
### Fixed
- (CORE) [#130](https://projekte.kosit.org/kosit/validator/-/issues/130) Check result to stdout causes an exception. This also fixes [GitHub #131](https://github.com/itplr-kosit/validator/issues/131)
- (CORE) [#131](https://projekte.kosit.org/kosit/validator/-/issues/131) `UnsupportedOperationException` because of read-only list. This also fixes [GitHub #136](https://github.com/itplr-kosit/validator/issues/136)
- (CLI) [#104](https://projekte.kosit.org/kosit/validator/-/issues/104) made the usage of the `-r` parameter optional, if only one unnamed scenario is used
- (CLI) [#145](https://projekte.kosit.org/kosit/validator/-/issues/145) If the CLI is invoked without any parameter, the usage is shown twice
- (DOC) [#129](https://projekte.kosit.org/kosit/validator/-/issues/129) API documentation is outdated. This also fixes [GitHub #130](https://github.com/itplr-kosit/validator/issues/130)
- (BUILD) [#62](https://projekte.kosit.org/kosit/validator/-/issues/62) Surefire Test Error running `de.kosit.validationtool.impl.xml.RemoteResolvingStrategyTest` fails without `http.proxy` setting
- (BUILD) [#110](https://projekte.kosit.org/kosit/validator/-/issues/110) reactivated the GitLab CI environment
### Added
- (BUILD) [#140](https://projekte.kosit.org/kosit/validator/-/issues/140) prepare pom.xml to be able to release to Maven Central
- (BUILD) [#144](https://projekte.kosit.org/kosit/validator/-/issues/144) created a Maven profile to release on Maven Central
### Changed
- (CORE) [#109](https://projekte.kosit.org/kosit/validator/-/issues/109) dependencies were updated to the latest Java 1.8 compatible versions
- Bump [Saxon HE](https://www.saxonica.com/documentation11/documentation.xml) to 12.8
- Bump [jaxb-ri](https://github.com/eclipse-ee4j/jaxb-ri) to 2.3.9
- Bump [SLF4J](https://www.slf4j.org/) to 2.0.17
- (CORE) [#136](https://projekte.kosit.org/kosit/validator/-/issues/136) removed IDE project folders from git
- (BUILD) [#135](https://projekte.kosit.org/kosit/validator/-/issues/135) protected specific git branches
- (BUILD) [#137](https://projekte.kosit.org/kosit/validator/-/issues/137) GitLab CI should only run on Java LTS versions as well as the latest Java version
- (BUILD) [#147](https://projekte.kosit.org/kosit/validator/-/issues/147) Change Maven coordinates from `de.kosit:validationtool` to `org.kosit:validator`
## 1.5.0
### Fixed ### Fixed
- (CLI) [#93](https://projekte.kosit.org/kosit/validator/-/issues/93) Remove usage information, when validation failed - (CLI) [#93](https://projekte.kosit.org/kosit/validator/-/issues/93) Remove usage information, when validation failed
- (CLI) [#95](https://projekte.kosit.org/kosit/validator/-/issues/95) NPE when using empty repository definition (-r "") - (CLI) [#95](https://projekte.kosit.org/kosit/validator/-/issues/95) NPE when using empty repository definition (-r "")
- (CORE) [GitHub #101](https://github.com/itplr-kosit/validator/issues/101) Role is null in FailedAssert
### Added ### Added
- (CLI) Support for multiple configurations and multiple repositories. See [cli documentation](https://github.com/itplr-kosit/validator/blob/master/docs/cli.md) for details - (CLI) Support for multiple configurations and multiple repositories. See [cli documentation](docs/cli.md) for details
- (API) Possibility to use preconfigured Saxon `Processor` instance for validation - (API) Possibility to use preconfigured Saxon `Processor` instance for validation
### Changed ### Changed
- (CORE) [GitHub #100](https://github.com/itplr-kosit/validator/issues/100) Make createReport optional
- (DAEMON) UI rewrite based on [Docusaurs](https://docusaurus.io) - (DAEMON) UI rewrite based on [Docusaurs](https://docusaurus.io)
- ( - (API) [ResolvingConfigurationStrategy.java#getProcessor()](de/kosit/validationtool/api/ResolvingConfigurationStrategy) is removed.
API) [ResolvingConfigurationStrategy.java#getProcessor()](https://github.com/itplr-kosit/validator/blob/master/src/main/java/de/kosit/validationtool/api/ResolvingConfigurationStrategy)
is removed.
- (CORE) Bump [Saxon HE](https://www.saxonica.com/documentation11/documentation.xml) to 11.4 - (CORE) Bump [Saxon HE](https://www.saxonica.com/documentation11/documentation.xml) to 11.4
- (CORE) Bump [jaxb-ri](https://github.com/eclipse-ee4j/jaxb-ri) to 2.3.7 - (CORE) Bump [jaxb-ri](https://github.com/eclipse-ee4j/jaxb-ri) to 2.3.7
- (CORE) Various other dependency updates. See pom.xml
- (CORE) CLI parsing based on pico-cli, commons-cli is removed - (CORE) CLI parsing based on pico-cli, commons-cli is removed
## 1.4.2 ## 1.4.2
@ -71,14 +120,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- InputFactory has methods to read any java.xml.transform.Source as Input not only StreamSources - InputFactory has methods to read any java.xml.transform.Source as Input not only StreamSources
- InputFactory uses a generated UUID as name for SourceInput, if no "real" name can be derived - InputFactory uses a generated UUID as name for SourceInput, if no "real" name can be derived
- saxon dependency update (minor, 9.9.1-7) - saxon dependency update (minor, 9.9.1-7)
- [DAEMON] proper status codes when returning results (see [daemon documentation](https://github.com/itplr-kosit/validator/blob/master/docs/daemon.md#status-codes)) - [DAEMON] proper status codes when returning results (see [daemon documentation](./docs/daemon.md#status-codes))
## 1.3.1 ## 1.3.1
### Fixed ### Fixed
- `getFailedAsserts()` and `isSchematronValid()` - `getFailedAsserts()` and `isSchematronValid()`
in [DefaultResult.java](https://github.com/itplr-kosit/validator/blob/master/src/main/java/de/kosit/validationtool/impl/DefaultResult.java) in [DefaultResult.java](https://github.com/itplr-kosit/validator/blob/main/src/main/java/de/kosit/validationtool/impl/DefaultResult.java)
do not reflect actual schematron validation result do not reflect actual schematron validation result
- processing aborts on schematron execution errors (e.g. errors within schematron logic). The validator now generates a - processing aborts on schematron execution errors (e.g. errors within schematron logic). The validator now generates a
report in such cases. report in such cases.
@ -126,20 +175,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added ### Added
- Provide access to schematron result - Provide access to schematron result
through [Result.java](https://github.com/itplr-kosit/validator/blob/master/src/main/java/de/kosit/validationtool/api/Result.java) through [Result.java](https://github.com/itplr-kosit/validator/blob/main/src/main/java/de/kosit/validationtool/api/Result.java)
- *Result#getFailedAsserts()* returns a list of failed asserts found by schematron - _Result#getFailedAsserts()_ returns a list of failed asserts found by schematron
- *Result#isSchematronValid()* convinience access to evaluate whether schematron was processed without any * - _Result#isSchematronValid()_ convinience access to evaluate whether schematron was processed without any _
FailedAsserts* FailedAsserts_
### Changed ### Changed
- *Result#getAcceptRecommendation()* does not _only_ work when _acceptMatch_ is configured in the scenario - _Result#getAcceptRecommendation()_ does not _only_ work when _acceptMatch_ is configured in the scenario
- schema correctness is a precondition, if the checked instance is not valid, this evaluates to _REJECTED_ - schema correctness is a precondition, if the checked instance is not valid, this evaluates to _REJECTED_
- if _acceptMatch_ is configured, the result is based on the boolean result of the xpath expression evaluated against - if _acceptMatch_ is configured, the result is based on the boolean result of the xpath expression evaluated against
the generated report the generated report
- if *no* _acceptMatch_ is configured, the result is based on evaluation of schema and schematron correctness - if _no_ _acceptMatch_ is configured, the result is based on evaluation of schema and schematron correctness
- _UNDEFINED_ is only returned, when processing is stopped somehow - _UNDEFINED_ is only returned, when processing is stopped somehow
- *Result#isAcceptable()* can now evaluate to true, when no _acceptMatch_ is configured (see above) - _Result#isAcceptable()_ can now evaluate to true, when no _acceptMatch_ is configured (see above)
## 1.1.3 ## 1.1.3

View file

@ -6,15 +6,19 @@ sidebar_position: 1
The validator needs a scenario configuration for working properly. The validator needs a scenario configuration for working properly.
Currently, there are two public third party validation configurations available. Here are some public validation configurations:
* Validation Configuration for [XRechnung](http://www.xoev.de/de/xrechnung): * Validation Configuration for [XRechnung](https://xeinkauf.de/xrechnung/):
* Source code is available on [GitHub](https://github.com/itplr-kosit/validator-configuration-xrechnung) * Source code is available on [GitHub](https://github.com/itplr-kosit/validator-configuration-xrechnung)
* [Releases](https://github.com/itplr-kosit/validator-configuration-xrechnung/releases) can also be downloaded * [Releases](https://github.com/itplr-kosit/validator-configuration-xrechnung/releases) can also be downloaded
* Validation Configuration for [Peppol BIS Billing](https://docs.peppol.eu/poacc/billing/3.0/):
* Source code is available on [GitHub](https://github.com/itplr-kosit/validator-configuration-bis)
* [Releases](https://github.com/itplr-kosit/validator-configuration-bis/releases) can also be downloaded
* Validation Configuration for [XGewerbeanzeige](https://xgewerbeanzeige.de/) * Validation Configuration for [XGewerbeanzeige](https://xgewerbeanzeige.de/)
* Source code is available on [GitHub](https://github.com/itplr-kosit/validator-configuration-xgewerbeanzeige) * Source code is available on [GitHub](https://github.com/itplr-kosit/validator-configuration-xgewerbeanzeige)
* [Releases](https://github.com/itplr-kosit/validator-configuration-xgewerbeanzeige/releases) can also be downloaded * [Releases](https://github.com/itplr-kosit/validator-configuration-xgewerbeanzeige/releases) can also be downloaded
For creating custom configurations For creating custom configurations
see [configuration documentation](https://github.com/itplr-kosit/validator/blob/master/docs/configurations.md) see [configuration documentation](https://github.com/itplr-kosit/validator/blob/main/docs/configurations.md)
for details for details

View file

@ -18,8 +18,8 @@
// @ts-check // @ts-check
// Note: type annotations allow type checking and IDEs autocompletion // Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require("prism-react-renderer/themes/github"); const lightCodeTheme = require("prism-react-renderer").themes.github;
const darkCodeTheme = require("prism-react-renderer/themes/dracula"); const darkCodeTheme = require("prism-react-renderer").themes.dracula;
const pkg = require("./package.json"); const pkg = require("./package.json");
/** @type {import('@docusaurus/types').Config} */ /** @type {import('@docusaurus/types').Config} */
@ -28,7 +28,7 @@ const config = {
tagline: "Validating any XML", tagline: "Validating any XML",
url: "https://your-docusaurus-test-site.com", url: "https://your-docusaurus-test-site.com",
baseUrl: "/", baseUrl: "/",
onBrokenLinks: "throw", onBrokenLinks: "log",
onBrokenMarkdownLinks: "warn", onBrokenMarkdownLinks: "warn",
favicon: "img/favicon.svg", favicon: "img/favicon.svg",
customFields: { customFields: {
@ -119,7 +119,7 @@ const config = {
title: "Community", title: "Community",
items: [ items: [
{ {
label: "Github", label: "GitHub",
href: "https://github.com/itplr-kosit/validator", href: "https://github.com/itplr-kosit/validator",
}, },
{ {
@ -133,11 +133,11 @@ const config = {
items: [ items: [
{ {
label: "KoSIT", label: "KoSIT",
href: "https://www.xoev.de", href: "https://xeinkauf.de",
}, },
{ {
label: "XRechnung", label: "XRechnung",
href: "https://www.xoev.de/xrechnung-16828", href: "https://xeinkauf.de/xrechnung/",
}, },
], ],
}, },

30143
server/ui/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -20,34 +20,33 @@
"lint:fix": "npm run format && eslint . --fix" "lint:fix": "npm run format && eslint . --fix"
}, },
"dependencies": { "dependencies": {
"@docusaurus/core": "2.2.0", "@docusaurus/core": "^3.8.1",
"@docusaurus/preset-classic": "2.2.0", "@docusaurus/preset-classic": "^3.8.1",
"@mdx-js/react": "^1.6.22", "@mdx-js/react": "^3.1.1",
"@mui/icons-material": "^5.10.14", "@mui/icons-material": "^7.3.2",
"clsx": "^1.2.1", "clsx": "^2.1.1",
"js-file-download": "^0.4.12", "js-file-download": "^0.4.12",
"prism-react-renderer": "^1.3.5", "prism-react-renderer": "^2.4.1",
"react": "^17.0.2", "react": "^19.1.1",
"react-dom": "^17.0.2", "react-dom": "^19.1.1",
"react-dropzone": "^14.2.3" "react-dropzone": "^14.3.8"
}, },
"devDependencies": { "devDependencies": {
"@docusaurus/module-type-aliases": "2.2.0", "@docusaurus/module-type-aliases": "^3.8.1",
"@tsconfig/docusaurus": "^1.0.5", "@tsconfig/docusaurus": "^2.0.3",
"@typescript-eslint/eslint-plugin": "^5.43.0", "@typescript-eslint/eslint-plugin": "^8.43.0",
"@typescript-eslint/parser": "^5.43.0", "@typescript-eslint/parser": "^8.43.0",
"cross-env": "^7.0.3", "cross-env": "^10.0.0",
"eslint": "^8.27.0", "eslint": "^9.35.0",
"eslint-config-airbnb": "^19.0.4", "eslint-config-prettier": "^10.1.8",
"eslint-config-prettier": "^8.5.0", "eslint-import-resolver-typescript": "^4.4.4",
"eslint-import-resolver-typescript": "^3.5.2", "eslint-plugin-import": "^2.32.0",
"eslint-plugin-import": "^2.26.0", "eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-jsx-a11y": "^6.6.1", "eslint-plugin-prettier": "^5.5.4",
"eslint-plugin-prettier": "^4.2.1", "eslint-plugin-react": "^7.37.5",
"eslint-plugin-react": "^7.31.10", "eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-hooks": "^4.6.0", "prettier": "^3.6.2",
"prettier": "^2.7.1", "typescript": "^5.9.2"
"typescript": "^4.7.4"
}, },
"browserslist": { "browserslist": {
"production": [ "production": [
@ -63,12 +62,7 @@
] ]
}, },
"engines": { "engines": {
"node": ">=16.14" "node": ">=18.0"
}, },
"overrides": { "overrides": {}
"loader-utils": "^2.0.4",
"react-dev-utils": {
"loader-utils": "^3.2.1"
}
}
} }

View file

@ -1,5 +1,5 @@
import clsx from "clsx"; import clsx from "clsx";
import type { ButtonHTMLAttributes, DetailedHTMLProps, ReactNode } from "react"; import type { ButtonHTMLAttributes, DetailedHTMLProps, JSX, ReactNode } from "react";
import React from "react"; import React from "react";
import type { ExtendProps } from "../util/types"; import type { ExtendProps } from "../util/types";
import styles from "./Button.module.css"; import styles from "./Button.module.css";

View file

@ -1,6 +1,6 @@
import React, { useEffect, useState } from "react"; import React, { JSX, useEffect, useState } from "react";
import type { PrismTheme, Language } from "prism-react-renderer"; import type { PrismTheme, Language } from "prism-react-renderer";
import Highlight, { defaultProps } from "prism-react-renderer"; import { Highlight, themes } from "prism-react-renderer";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import clsx from "clsx"; import clsx from "clsx";
import downloadFile from "js-file-download"; import downloadFile from "js-file-download";
@ -63,7 +63,6 @@ function Codeblock({
return ( return (
<div className={styles.wrapper}> <div className={styles.wrapper}>
<Highlight <Highlight
{...defaultProps}
code={children} code={children}
language={language} language={language}
theme={codeTheme} theme={codeTheme}

View file

@ -1,5 +1,5 @@
/* eslint-disable react/jsx-props-no-spreading */ /* eslint-disable react/jsx-props-no-spreading */
import React from "react"; import React, { JSX } from "react";
import clsx from "clsx"; import clsx from "clsx";
import type { DropEvent } from "react-dropzone"; import type { DropEvent } from "react-dropzone";
import { useDropzone } from "react-dropzone"; import { useDropzone } from "react-dropzone";

View file

@ -1,4 +1,4 @@
import type { ReactNode } from "react"; import type { JSX, ReactNode } from "react";
import React from "react"; import React from "react";
import Layout from "@theme/Layout"; import Layout from "@theme/Layout";
import styles from "./PageLayout.module.css"; import styles from "./PageLayout.module.css";

View file

@ -1,4 +1,4 @@
import React from "react"; import React, { JSX } from "react";
import PageLayout from "@site/src/components/PageLayout"; import PageLayout from "@site/src/components/PageLayout";
import XmlView from "@site/src/components/XmlView"; import XmlView from "@site/src/components/XmlView";

View file

@ -1,4 +1,4 @@
import React from "react"; import React, { JSX } from "react";
import PageLayout from "@site/src/components/PageLayout"; import PageLayout from "@site/src/components/PageLayout";
import XmlView from "@site/src/components/XmlView"; import XmlView from "@site/src/components/XmlView";

View file

@ -1,4 +1,4 @@
import React from "react"; import React, { JSX } from "react";
import Upload from "../components/Upload"; import Upload from "../components/Upload";
import PageLayout from "../components/PageLayout"; import PageLayout from "../components/PageLayout";

View file

@ -45,7 +45,7 @@ public interface Input {
/** /**
* The digest algorithm used for computing the {@link #getHashCode()} * The digest algorithm used for computing the {@link #getHashCode()}
* *
* @return the name of the digest algorith * @return the name of the digest algorithm
*/ */
String getDigestAlgorithm(); String getDigestAlgorithm();

View file

@ -22,6 +22,7 @@ import org.oclc.purl.dsdl.svrl.FailedAssert;
import org.oclc.purl.dsdl.svrl.SchematronOutput; import org.oclc.purl.dsdl.svrl.SchematronOutput;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import de.kosit.validationtool.impl.model.CustomFailedAssert;
import net.sf.saxon.s9api.XdmNode; import net.sf.saxon.s9api.XdmNode;
/** /**
@ -69,23 +70,31 @@ public interface Result {
/** /**
* Schnellzugriff auf die Empfehlung zur Weiterverarbeitung des Dokuments. * Schnellzugriff auf die Empfehlung zur Weiterverarbeitung des Dokuments.
* *
* @return true wenn {@link AcceptRecommendation#ACCEPTABLE} * @return <code>true</code> wenn {@link AcceptRecommendation#ACCEPTABLE}
*/ */
boolean isAcceptable(); boolean isAcceptable();
/** /**
* Gibt eine Liste mit gefundenen Schema-Validation-Fehler zurück. Diese Liste ist leer, wenn keine Fehler gefunden * Gibt eine Liste mit gefundenen Schema-Validation-Fehler zurück. Diese Liste ist leer, wenn keine Fehler gefunden
* wurden. * wurden.
*
* @return List of schema validation errors.
*/ */
List<XmlError> getSchemaViolations(); List<XmlError> getSchemaViolations();
/** /**
* Liefert die Ergebnisse der Schematron-Prüfungen, in der Reihenfolge der Szenario-Konfiguration. * Liefert die Ergebnisse der Schematron-Prüfungen, in der Reihenfolge der Szenario-Konfiguration.
* *
* @return Liste mit Schematron-Ergebnissen * @return List with Schematron results
*/ */
List<SchematronOutput> getSchematronResult(); List<SchematronOutput> getSchematronResult();
/**
* @return List of custom failed asserts per Schematron level. Only failed assertions with a custom level are
* contained. Never <code>null</code> but maybe empty.
*/
List<CustomFailedAssert> getCustomFailedAsserts();
/** /**
* Returns {@link org.oclc.purl.dsdl.svrl.FailedAssert FailedAsserts} of a schematron evaluation. * Returns {@link org.oclc.purl.dsdl.svrl.FailedAssert FailedAsserts} of a schematron evaluation.
* *
@ -96,14 +105,14 @@ public interface Result {
/** /**
* Liefert ein true, wenn keine Schema-Violations vorhanden sind. * Liefert ein true, wenn keine Schema-Violations vorhanden sind.
* *
* @return true wenn Schema-valide * @return <code>true</code> if XML Schema compliant
*/ */
boolean isSchemaValid(); boolean isSchemaValid();
/** /**
* Liefert ein true, wenn der Prüfling eine well-formed XML-Datei ist. * Liefert ein true, wenn der Prüfling eine well-formed XML-Datei ist.
* *
* @return true wenn well-formed * @return <code>true</code> if wellformed
*/ */
boolean isWellformed(); boolean isWellformed();
@ -111,7 +120,7 @@ public interface Result {
* Returns true, if schematron has been checked and the result does not contain any {@link FailedAssert * Returns true, if schematron has been checked and the result does not contain any {@link FailedAssert
* FailedAsserts}. * FailedAsserts}.
* *
* @return true, if valid * @return <code>true</code>, if valid
*/ */
boolean isSchematronValid(); boolean isSchematronValid();
} }

View file

@ -23,16 +23,14 @@ import java.util.Map;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import de.kosit.validationtool.cmd.assertions.AssertionType; import de.kosit.validationtool.cmd.assertions.AssertionType;
import de.kosit.validationtool.cmd.assertions.Assertions; import de.kosit.validationtool.cmd.assertions.Assertions;
import de.kosit.validationtool.impl.model.Result; import de.kosit.validationtool.impl.model.Result;
import de.kosit.validationtool.impl.tasks.CheckAction; import de.kosit.validationtool.impl.tasks.CheckAction;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import net.sf.saxon.s9api.Processor; import net.sf.saxon.s9api.Processor;
import net.sf.saxon.s9api.SaxonApiException; import net.sf.saxon.s9api.SaxonApiException;
import net.sf.saxon.s9api.XPathCompiler; import net.sf.saxon.s9api.XPathCompiler;
@ -56,12 +54,12 @@ class CheckAssertionAction implements CheckAction {
private Map<String, List<AssertionType>> mappedAssertions; private Map<String, List<AssertionType>> mappedAssertions;
private static boolean matches(String key, String name) { private static boolean matches(final String key, final String name) {
return key.startsWith(name) || (name + ".xml").endsWith(key); return key.startsWith(name) || (name + ".xml").endsWith(key);
} }
@Override @Override
public void check(Bag results) { public void check(final Bag results) {
log.info("Checking assertions for {}", results.getInput().getName()); log.info("Checking assertions for {}", results.getInput().getName());
final List<AssertionType> toCheck = findAssertions(results.getName()); final List<AssertionType> toCheck = findAssertions(results.getName());
final List<String> errors = new ArrayList<>(); final List<String> errors = new ArrayList<>();
@ -84,28 +82,28 @@ class CheckAssertionAction implements CheckAction {
} }
} }
private List<AssertionType> findAssertions(String name) { private List<AssertionType> findAssertions(final String name) {
return getMapped().entrySet().stream().filter(e -> matches(e.getKey(), name)).map(Map.Entry::getValue).findFirst().orElse(null); return getMapped().entrySet().stream().filter(e -> matches(e.getKey(), name)).map(Map.Entry::getValue).findFirst().orElse(null);
} }
private boolean check(XdmNode document, AssertionType assertion) { private boolean check(final XdmNode document, final AssertionType assertion) {
try { try {
final XPathSelector selector = createSelector(assertion); final XPathSelector selector = createSelector(assertion);
selector.setContextItem(document); selector.setContextItem(document);
return selector.effectiveBooleanValue(); return selector.effectiveBooleanValue();
} catch (SaxonApiException e) { } catch (final SaxonApiException e) {
log.error("Error evaluating assertion {} for {}", assertion.getTest(), assertion.getReportDoc(), e); log.error("Error evaluating assertion {} for {}", assertion.getTest(), assertion.getReportDoc(), e);
} }
return false; return false;
} }
private XPathSelector createSelector(AssertionType assertion) throws SaxonApiException { private XPathSelector createSelector(final AssertionType assertion) {
try { try {
final XPathCompiler compiler = getProcessor().newXPathCompiler(); final XPathCompiler compiler = getProcessor().newXPathCompiler();
assertions.getNamespace().forEach(ns -> compiler.declareNamespace(ns.getPrefix(), ns.getValue())); assertions.getNamespace().forEach(ns -> compiler.declareNamespace(ns.getPrefix(), ns.getValue()));
return compiler.compile(assertion.getTest()).load(); return compiler.compile(assertion.getTest()).load();
} catch (SaxonApiException e) { } catch (final SaxonApiException e) {
throw new IllegalStateException(String.format("Can not compile xpath match expression '%s'", throw new IllegalStateException(String.format("Can not compile xpath match expression '%s'",
StringUtils.isNotBlank(assertion.getTest()) ? assertion.getTest() : "EMPTY EXPRESSION"), e); StringUtils.isNotBlank(assertion.getTest()) ? assertion.getTest() : "EMPTY EXPRESSION"), e);
} }
@ -114,8 +112,8 @@ class CheckAssertionAction implements CheckAction {
private Map<String, List<AssertionType>> getMapped() { private Map<String, List<AssertionType>> getMapped() {
if (mappedAssertions == null) { if (mappedAssertions == null) {
mappedAssertions = new HashMap<>(); mappedAssertions = new HashMap<>();
for (AssertionType assertionType : assertions.getAssertion()) { for (final AssertionType assertionType : assertions.getAssertion()) {
List<AssertionType> list = mappedAssertions.computeIfAbsent(assertionType.getReportDoc(), k -> new ArrayList<>()); final List<AssertionType> list = mappedAssertions.computeIfAbsent(assertionType.getReportDoc(), k -> new ArrayList<>());
list.add(assertionType); list.add(assertionType);
} }
} }

View file

@ -95,6 +95,8 @@ public class CommandLineApplication {
return resultStatus; return resultStatus;
} }
// The signature is required, because the method is used a lambda
@SuppressWarnings("unused")
private static int logExecutionException(final Exception ex, final CommandLine cli, final ParseResult parseResult) { private static int logExecutionException(final Exception ex, final CommandLine cli, final ParseResult parseResult) {
final String message = isNotEmpty(ex.getMessage()) ? ex.getMessage() : "Es ist eine Fehler aufgetreten"; final String message = isNotEmpty(ex.getMessage()) ? ex.getMessage() : "Es ist eine Fehler aufgetreten";
Printer.writeErr(ex, message); Printer.writeErr(ex, message);

View file

@ -20,8 +20,8 @@ import lombok.Getter;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
/** /**
* CLI return codes. Codes > 0 indicate a processing error. Codes < indicates a configuration error. Code 0 indicates a * CLI return codes. Codes &gt; 0 indicate a processing error. Codes &lt; 0 indicates a configuration error. Code 0
* successful processing. * indicates a successful processing.
* *
* @author Andreas Penski * @author Andreas Penski
*/ */

View file

@ -321,10 +321,8 @@ public class Validator {
private static URI determineRepository(final Path d) { private static URI determineRepository(final Path d) {
if (Files.isDirectory(d)) { if (Files.isDirectory(d)) {
return d.toUri(); return d.toUri();
} else {
throw new IllegalArgumentException(
String.format("Not a valid path for repository definition specified: '%s'", d.toAbsolutePath()));
} }
throw new IllegalArgumentException(String.format("Not a valid path for repository definition specified: '%s'", d.toAbsolutePath()));
} }

View file

@ -82,6 +82,7 @@ public class Grid {
* *
* @param name the name of the column * @param name the name of the column
* @param maxLength the max length of the column * @param maxLength the max length of the column
* @param minLength the minimum length of the column
*/ */
public ColumnDefinition(final String name, final int maxLength, final int minLength) { public ColumnDefinition(final String name, final int maxLength, final int minLength) {
this(name, maxLength, minLength, 1); this(name, maxLength, minLength, 1);
@ -91,7 +92,8 @@ public class Grid {
* Constructor. * Constructor.
* *
* @param name the name of the column * @param name the name of the column
* @param minLength the max length of the column * @param maxLength the max length of the column
* @param minLength the minimum length of the column
* @param maxLines the max lines per cell * @param maxLines the max lines per cell
*/ */
public ColumnDefinition(final String name, final int maxLength, final int minLength, final int maxLines) { public ColumnDefinition(final String name, final int maxLength, final int minLength, final int maxLines) {
@ -149,10 +151,6 @@ public class Grid {
this.text.add(txt); this.text.add(txt);
} }
public Cell(final Object object, final Code... codes) {
this(new Text(object, codes));
}
protected Line getFormattedLine(final int lineNumber, final ColumnDefinition def) { protected Line getFormattedLine(final int lineNumber, final ColumnDefinition def) {
final Line line = new Line(); final Line line = new Line();
int startSubstring = lineNumber * def.getLength(); int startSubstring = lineNumber * def.getLength();
@ -194,11 +192,6 @@ public class Grid {
} }
public Cell add(final Object object, final Code... codes) {
this.text.add(new Text(object, codes));
return this;
}
} }
private static final Format DEFAULT_FORMAT = new Format(); private static final Format DEFAULT_FORMAT = new Format();
@ -321,7 +314,7 @@ public class Grid {
} }
private static boolean isEmpty(final StringBuilder current) { private static boolean isEmpty(final StringBuilder current) {
return current.toString().replaceAll("\\|", "").trim().length() == 0; return current.toString().replace("|", "").trim().length() == 0;
} }
private int getMaxVirtualLine() { private int getMaxVirtualLine() {

View file

@ -16,8 +16,6 @@
package de.kosit.validationtool.config; package de.kosit.validationtool.config;
import static org.apache.commons.lang3.StringUtils.startsWith;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.net.URI; import java.net.URI;
import java.util.HashMap; import java.util.HashMap;
@ -27,10 +25,7 @@ import java.util.stream.Collectors;
import javax.xml.validation.Schema; import javax.xml.validation.Schema;
import lombok.AccessLevel; import org.apache.commons.lang3.Strings;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import de.kosit.validationtool.api.Check; import de.kosit.validationtool.api.Check;
import de.kosit.validationtool.api.Configuration; import de.kosit.validationtool.api.Configuration;
@ -49,7 +44,10 @@ import de.kosit.validationtool.model.reportInput.XMLSyntaxError;
import de.kosit.validationtool.model.scenarios.ResourceType; import de.kosit.validationtool.model.scenarios.ResourceType;
import de.kosit.validationtool.model.scenarios.ScenarioType; import de.kosit.validationtool.model.scenarios.ScenarioType;
import de.kosit.validationtool.model.scenarios.Scenarios; import de.kosit.validationtool.model.scenarios.Scenarios;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import net.sf.saxon.s9api.Processor; import net.sf.saxon.s9api.Processor;
import net.sf.saxon.s9api.QName; import net.sf.saxon.s9api.QName;
import net.sf.saxon.s9api.XdmNode; import net.sf.saxon.s9api.XdmNode;
@ -113,8 +111,8 @@ public class ConfigurationLoader {
private static boolean isSupportedDocument(final XdmNode doc) { private static boolean isSupportedDocument(final XdmNode doc) {
final XdmNode root = findRoot(doc); final XdmNode root = findRoot(doc);
final String frameworkVersion = root.getAttributeValue(new QName("frameworkVersion")); final String frameworkVersion = root.getAttributeValue(new QName("frameworkVersion"));
return startsWith(frameworkVersion, SUPPORTED_MAJOR_VERSION) return Strings.CS.startsWith(frameworkVersion, SUPPORTED_MAJOR_VERSION)
&& root.getNodeName().getNamespaceURI().equals(SUPPORTED_MAJOR_VERSION_SCHEMA); && root.getNodeName().getNamespace().equals(SUPPORTED_MAJOR_VERSION_SCHEMA);
} }
private static Scenario createFallback(final Scenarios scenarios, final ContentRepository repository) { private static Scenario createFallback(final Scenarios scenarios, final ContentRepository repository) {

View file

@ -44,18 +44,18 @@ abstract class BaseHandler implements HttpHandler {
throws IOException { throws IOException {
exchange.getResponseHeaders().add("Content-Type", contentType); exchange.getResponseHeaders().add("Content-Type", contentType);
exchange.sendResponseHeaders(statusCode, 0); exchange.sendResponseHeaders(statusCode, 0);
final OutputStream os = exchange.getResponseBody(); try ( final OutputStream os = exchange.getResponseBody() ) {
write.write(os); write.write(os);
os.close(); }
} }
protected static void error(final HttpExchange exchange, final int statusCode, final String message) throws IOException { protected static void error(final HttpExchange exchange, final int statusCode, final String message) throws IOException {
final byte[] bytes = message.getBytes(); final byte[] bytes = message.getBytes();
exchange.getResponseHeaders().add("Content-Type", "text/plain"); exchange.getResponseHeaders().add("Content-Type", "text/plain");
exchange.sendResponseHeaders(statusCode, bytes.length); exchange.sendResponseHeaders(statusCode, bytes.length);
final OutputStream os = exchange.getResponseBody(); try ( final OutputStream os = exchange.getResponseBody() ) {
os.write(bytes); os.write(bytes);
os.close(); }
} }
@FunctionalInterface @FunctionalInterface

View file

@ -17,11 +17,9 @@
package de.kosit.validationtool.impl; package de.kosit.validationtool.impl;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.List;
import java.util.StringJoiner; import java.util.StringJoiner;
import javax.xml.bind.ValidationEvent;
import javax.xml.bind.ValidationEventHandler;
import javax.xml.transform.ErrorListener; import javax.xml.transform.ErrorListener;
import javax.xml.transform.SourceLocator; import javax.xml.transform.SourceLocator;
import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerException;
@ -30,11 +28,11 @@ import org.xml.sax.ErrorHandler;
import org.xml.sax.SAXException; import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException; import org.xml.sax.SAXParseException;
import lombok.Getter;
import de.kosit.validationtool.model.reportInput.XMLSyntaxError; import de.kosit.validationtool.model.reportInput.XMLSyntaxError;
import de.kosit.validationtool.model.reportInput.XMLSyntaxErrorSeverity; import de.kosit.validationtool.model.reportInput.XMLSyntaxErrorSeverity;
import jakarta.xml.bind.ValidationEvent;
import jakarta.xml.bind.ValidationEventHandler;
import lombok.Getter;
import net.sf.saxon.s9api.MessageListener2; import net.sf.saxon.s9api.MessageListener2;
import net.sf.saxon.s9api.QName; import net.sf.saxon.s9api.QName;
import net.sf.saxon.s9api.XdmNode; import net.sf.saxon.s9api.XdmNode;
@ -51,7 +49,7 @@ public class CollectingErrorEventHandler implements ValidationEventHandler, Erro
private static final int stopProcessCount = DEFAULT_ABORT_COUNT; private static final int stopProcessCount = DEFAULT_ABORT_COUNT;
private final Collection<XMLSyntaxError> errors = new ArrayList<>(); private final List<XMLSyntaxError> errors = new ArrayList<>();
private static XMLSyntaxError createError(final XMLSyntaxErrorSeverity severity, final String message) { private static XMLSyntaxError createError(final XMLSyntaxErrorSeverity severity, final String message) {
final XMLSyntaxError e = new XMLSyntaxError(); final XMLSyntaxError e = new XMLSyntaxError();

View file

@ -37,10 +37,6 @@ import javax.xml.validation.SchemaFactory;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.xml.sax.SAXException; import org.xml.sax.SAXException;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import de.kosit.validationtool.api.ResolvingConfigurationStrategy; import de.kosit.validationtool.api.ResolvingConfigurationStrategy;
import de.kosit.validationtool.impl.Scenario.Transformation; import de.kosit.validationtool.impl.Scenario.Transformation;
import de.kosit.validationtool.impl.xml.RelativeUriResolver; import de.kosit.validationtool.impl.xml.RelativeUriResolver;
@ -49,7 +45,9 @@ import de.kosit.validationtool.model.scenarios.NamespaceType;
import de.kosit.validationtool.model.scenarios.ResourceType; import de.kosit.validationtool.model.scenarios.ResourceType;
import de.kosit.validationtool.model.scenarios.ScenarioType; import de.kosit.validationtool.model.scenarios.ScenarioType;
import de.kosit.validationtool.model.scenarios.ValidateWithSchematron; import de.kosit.validationtool.model.scenarios.ValidateWithSchematron;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import net.sf.saxon.lib.UnparsedTextURIResolver; import net.sf.saxon.lib.UnparsedTextURIResolver;
import net.sf.saxon.s9api.Processor; import net.sf.saxon.s9api.Processor;
import net.sf.saxon.s9api.SaxonApiException; import net.sf.saxon.s9api.SaxonApiException;

View file

@ -24,14 +24,6 @@ import java.util.Arrays;
import java.util.Collection; import java.util.Collection;
import java.util.StringJoiner; import java.util.StringJoiner;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import javax.xml.bind.JAXBIntrospector;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.ValidationEventHandler;
import javax.xml.bind.annotation.XmlRegistry;
import javax.xml.namespace.QName; import javax.xml.namespace.QName;
import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLOutputFactory; import javax.xml.stream.XMLOutputFactory;
@ -44,6 +36,14 @@ import javax.xml.validation.Schema;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import jakarta.xml.bind.JAXBContext;
import jakarta.xml.bind.JAXBElement;
import jakarta.xml.bind.JAXBException;
import jakarta.xml.bind.JAXBIntrospector;
import jakarta.xml.bind.Marshaller;
import jakarta.xml.bind.Unmarshaller;
import jakarta.xml.bind.ValidationEventHandler;
import jakarta.xml.bind.annotation.XmlRegistry;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
/** /**
@ -219,6 +219,7 @@ public class ConversionService {
final XMLOutputFactory xof = XMLOutputFactory.newFactory(); final XMLOutputFactory xof = XMLOutputFactory.newFactory();
final XMLStreamWriter xmlStreamWriter = xof.createXMLStreamWriter(w); final XMLStreamWriter xmlStreamWriter = xof.createXMLStreamWriter(w);
if (null == introspector.getElementName(model)) { if (null == introspector.getElementName(model)) {
@SuppressWarnings({ "rawtypes", "unchecked" })
final JAXBElement jaxbElement = new JAXBElement(createQName(model), model.getClass(), model); final JAXBElement jaxbElement = new JAXBElement(createQName(model), model.getClass(), model);
marshaller.marshal(jaxbElement, xmlStreamWriter); marshaller.marshal(jaxbElement, xmlStreamWriter);
} else { } else {

View file

@ -20,19 +20,21 @@ import static de.kosit.validationtool.impl.DateFactory.createTimestamp;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import lombok.Getter; import org.oclc.purl.dsdl.svrl.FailedAssert;
import lombok.extern.slf4j.Slf4j; import org.oclc.purl.dsdl.svrl.SchematronOutput;
import de.kosit.validationtool.api.Check; import de.kosit.validationtool.api.Check;
import de.kosit.validationtool.api.Configuration; import de.kosit.validationtool.api.Configuration;
import de.kosit.validationtool.api.Input; import de.kosit.validationtool.api.Input;
import de.kosit.validationtool.api.Result; import de.kosit.validationtool.api.Result;
import de.kosit.validationtool.api.XmlError; import de.kosit.validationtool.api.XmlError;
import de.kosit.validationtool.impl.model.CustomFailedAssert;
import de.kosit.validationtool.impl.tasks.CheckAction; import de.kosit.validationtool.impl.tasks.CheckAction;
import de.kosit.validationtool.impl.tasks.CheckAction.Bag; import de.kosit.validationtool.impl.tasks.CheckAction.Bag;
import de.kosit.validationtool.impl.tasks.ComputeAcceptanceAction; import de.kosit.validationtool.impl.tasks.ComputeAcceptanceAction;
@ -47,7 +49,10 @@ import de.kosit.validationtool.impl.xml.ProcessorProvider;
import de.kosit.validationtool.model.reportInput.CreateReportInput; import de.kosit.validationtool.model.reportInput.CreateReportInput;
import de.kosit.validationtool.model.reportInput.EngineType; import de.kosit.validationtool.model.reportInput.EngineType;
import de.kosit.validationtool.model.reportInput.XMLSyntaxError; import de.kosit.validationtool.model.reportInput.XMLSyntaxError;
import de.kosit.validationtool.model.scenarios.ErrorLevelType;
import de.kosit.validationtool.model.scenarios.ScenarioType;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import net.sf.saxon.s9api.Processor; import net.sf.saxon.s9api.Processor;
/** /**
@ -141,10 +146,31 @@ public class DefaultCheck implements Check {
result.setProcessingSuccessful(!t.isStopped() && t.isFinished()); result.setProcessingSuccessful(!t.isStopped() && t.isFinished());
result.setSchematronResult(t.getReportInput().getValidationResultsSchematron().stream().filter(e -> e.getResults() != null) result.setSchematronResult(t.getReportInput().getValidationResultsSchematron().stream().filter(e -> e.getResults() != null)
.map(e -> e.getResults().getSchematronOutput()).collect(Collectors.toList())); .map(e -> e.getResults().getSchematronOutput()).collect(Collectors.toList()));
result.setCustomFailedAsserts(buildCustomFailedAssertsList(t, result.getSchematronResult()));
return result; return result;
} }
private static List<XmlError> convertErrors(final Collection<XMLSyntaxError> errors) { private List<CustomFailedAssert> buildCustomFailedAssertsList(final Bag t, final List<SchematronOutput> schematronResult) {
// Get Map of Assertion ID to custom error levels for the current scenario
final Map<String, ErrorLevelType> customLevels = Optional.ofNullable(t.getScenarioSelectionResult())
.map(de.kosit.validationtool.impl.model.Result::getObject).map(Scenario::getConfiguration)
.map(ScenarioType::getCreateReport)
.map(r -> r.getCustomLevel().stream()
.flatMap(customLevel -> customLevel.getValue().stream().map(id -> Map.entry(id, customLevel.getLevel())))
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)))
.orElse(Collections.emptyMap());
// Now check all failed assertions of all schematron validations if they contain a failed assertion with one of
// the changed IDs
return schematronResult.stream().flatMap(x -> x.getActivePatternAndFiredRuleAndFailedAssert().stream())
.filter(FailedAssert.class::isInstance).map(FailedAssert.class::cast).filter(fa -> customLevels.containsKey(fa.getId()))
.map(fa -> new CustomFailedAssert(fa, customLevels.get(fa.getId()))).collect(Collectors.toList());
}
@SuppressWarnings("unchecked")
private static List<XmlError> convertErrors(final List<XMLSyntaxError> errors) {
// noinspection unchecked // noinspection unchecked
return (List<XmlError>) (List<?>) errors; return (List<XmlError>) (List<?>) errors;
} }

View file

@ -25,15 +25,14 @@ import org.oclc.purl.dsdl.svrl.SchematronOutput;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
import de.kosit.validationtool.api.AcceptRecommendation; import de.kosit.validationtool.api.AcceptRecommendation;
import de.kosit.validationtool.api.Result; import de.kosit.validationtool.api.Result;
import de.kosit.validationtool.api.XmlError; import de.kosit.validationtool.api.XmlError;
import de.kosit.validationtool.impl.model.CustomFailedAssert;
import de.kosit.validationtool.model.reportInput.CreateReportInput; import de.kosit.validationtool.model.reportInput.CreateReportInput;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
import net.sf.saxon.dom.NodeOverNodeInfo; import net.sf.saxon.dom.NodeOverNodeInfo;
import net.sf.saxon.s9api.XdmNode; import net.sf.saxon.s9api.XdmNode;
@ -67,6 +66,11 @@ public class DefaultResult implements Result {
@Setter(AccessLevel.PACKAGE) @Setter(AccessLevel.PACKAGE)
private List<SchematronOutput> schematronResult; private List<SchematronOutput> schematronResult;
/**
* List of custom failed asserts per Schematron level. Only failed assertions with a custom level are contained.
*/
private List<CustomFailedAssert> customFailedAsserts;
@Getter @Getter
@Setter @Setter
private boolean processingSuccessful; private boolean processingSuccessful;
@ -149,19 +153,28 @@ public class DefaultResult implements Result {
} }
private <T> List<T> filterSchematronResult(final Class<T> type) { private <T> List<T> filterSchematronResult(final Class<T> type) {
return getSchematronResult() != null return this.schematronResult != null
? getSchematronResult().stream().flatMap(e -> e.getActivePatternAndFiredRuleAndFailedAssert().stream()) ? this.schematronResult.stream().flatMap(e -> e.getActivePatternAndFiredRuleAndFailedAssert().stream())
.filter(type::isInstance).map(type::cast).collect(Collectors.toList()) .filter(type::isInstance).map(type::cast).collect(Collectors.toList())
: Collections.emptyList(); : Collections.emptyList();
} }
private boolean isSchematronEvaluated() { private boolean isSchematronEvaluated() {
return getSchematronResult() != null return this.schematronResult != null
&& getSchematronResult().stream().noneMatch(e -> e.getActivePatternAndFiredRuleAndFailedAssert().isEmpty()); && this.schematronResult.stream().noneMatch(e -> e.getActivePatternAndFiredRuleAndFailedAssert().isEmpty());
} }
@Override @Override
public boolean isSchematronValid() { public boolean isSchematronValid() {
return isSchematronEvaluated() && getFailedAsserts().isEmpty(); return isSchematronEvaluated() && getFailedAsserts().isEmpty();
} }
@Override
public List<CustomFailedAssert> getCustomFailedAsserts() {
return this.customFailedAsserts;
}
public void setCustomFailedAsserts(List<CustomFailedAssert> customFailedAsserts) {
this.customFailedAsserts = customFailedAsserts;
}
} }

View file

@ -17,15 +17,12 @@
package de.kosit.validationtool.impl; package de.kosit.validationtool.impl;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import lombok.extern.slf4j.Slf4j;
import de.kosit.validationtool.api.Configuration; import de.kosit.validationtool.api.Configuration;
import de.kosit.validationtool.impl.model.Result; import de.kosit.validationtool.impl.model.Result;
import lombok.extern.slf4j.Slf4j;
import net.sf.saxon.s9api.SaxonApiException; import net.sf.saxon.s9api.SaxonApiException;
import net.sf.saxon.s9api.XPathSelector; import net.sf.saxon.s9api.XPathSelector;
import net.sf.saxon.s9api.XdmNode; import net.sf.saxon.s9api.XdmNode;
@ -67,17 +64,14 @@ public class ScenarioRepository {
private String summarizeScenarios() { private String summarizeScenarios() {
final StringBuilder b = new StringBuilder(); final StringBuilder b = new StringBuilder();
getScenarios().forEach(s -> { getScenarios().forEach(s -> b.append(s.getName()).append('\n'));
b.append(s.getName());
b.append("\n");
});
return b.toString(); return b.toString();
} }
/** /**
* Ermittelt für das gegebene Dokument das passende Szenario. * Determine the matching Scenario for the provided input document
* *
* @param document das Eingabedokument * @param document input document
* @return ein Ergebnis-Objekt zur weiteren Verarbeitung * @return ein Ergebnis-Objekt zur weiteren Verarbeitung
*/ */
public Result<Scenario, String> selectScenario(final XdmNode document) { public Result<Scenario, String> selectScenario(final XdmNode document) {
@ -86,10 +80,9 @@ public class ScenarioRepository {
if (collect.size() == 1) { if (collect.size() == 1) {
result = new Result<>(collect.get(0)); result = new Result<>(collect.get(0));
} else if (collect.isEmpty()) { } else if (collect.isEmpty()) {
result = new Result<>(getFallbackScenario(), result = new Result<>(getFallbackScenario(), Arrays.asList("None of the loaded scenarios matches the specified document"));
Collections.singleton("None of the loaded scenarios matches the specified document"));
} else { } else {
result = new Result<>(getFallbackScenario(), Collections.singleton("More than on scenario matches the specified document")); result = new Result<>(getFallbackScenario(), Arrays.asList("More than one scenario matches the specified document"));
} }
return result; return result;

View file

@ -19,18 +19,18 @@ package de.kosit.validationtool.impl.input;
import static org.apache.commons.lang3.StringUtils.defaultIfBlank; import static org.apache.commons.lang3.StringUtils.defaultIfBlank;
import java.io.IOException; import java.io.IOException;
import java.io.UncheckedIOException;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import javax.xml.bind.util.JAXBSource;
import javax.xml.transform.Source; import javax.xml.transform.Source;
import javax.xml.transform.dom.DOMSource; import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamSource; import javax.xml.transform.stream.StreamSource;
import org.apache.commons.io.input.ReaderInputStream; import org.apache.commons.io.input.ReaderInputStream;
import jakarta.xml.bind.util.JAXBSource;
import lombok.Getter; import lombok.Getter;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.sf.saxon.om.TreeInfo; import net.sf.saxon.om.TreeInfo;
/** /**
@ -43,7 +43,7 @@ import net.sf.saxon.om.TreeInfo;
* <ul> * <ul>
* <li>{@link StreamSource} - both {@link java.io.InputStream} based and {@link java.io.Reader} based</li> * <li>{@link StreamSource} - both {@link java.io.InputStream} based and {@link java.io.Reader} based</li>
* <li>{@link javax.xml.transform.dom.DOMSource}</li> * <li>{@link javax.xml.transform.dom.DOMSource}</li>
* <li>{@link javax.xml.bind.util.JAXBSource}</li> * <li>{@link jakarta.xml.bind.util.JAXBSource}</li>
* <li>{@link TreeInfo}</li> * <li>{@link TreeInfo}</li>
* </ul> * </ul>
* *
@ -102,7 +102,7 @@ public class SourceInput extends AbstractInput {
return isStreamSource(); return isStreamSource();
} }
private boolean isConsumed() throws IOException { private boolean isConsumed() {
if (isStreamSource()) { if (isStreamSource()) {
final StreamSource ss = (StreamSource) this.source; final StreamSource ss = (StreamSource) this.source;
@ -140,7 +140,13 @@ public class SourceInput extends AbstractInput {
if (ss.getInputStream() != null) { if (ss.getInputStream() != null) {
result = new StreamSource(wrap(ss.getInputStream()), this.source.getSystemId()); result = new StreamSource(wrap(ss.getInputStream()), this.source.getSystemId());
} else if (ss.getReader() != null) { } else if (ss.getReader() != null) {
result = new StreamSource(wrap(new ReaderInputStream(ss.getReader(), Charset.defaultCharset())), this.source.getSystemId()); try {
result = new StreamSource(
wrap(ReaderInputStream.builder().setReader(ss.getReader()).setCharset(Charset.defaultCharset()).get()),
this.source.getSystemId());
} catch (final IOException ex) {
throw new UncheckedIOException(ex);
}
} }
} }
return result; return result;

View file

@ -20,13 +20,14 @@ import java.io.BufferedInputStream;
import java.io.FilterInputStream; import java.io.FilterInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.UncheckedIOException;
import java.security.DigestInputStream; import java.security.DigestInputStream;
import java.security.MessageDigest; import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
import javax.xml.transform.stream.StreamSource; import javax.xml.transform.stream.StreamSource;
import org.apache.commons.io.input.CountingInputStream; import org.apache.commons.io.input.BoundedInputStream;
import de.kosit.validationtool.api.Input; import de.kosit.validationtool.api.Input;
@ -39,7 +40,7 @@ public class StreamHelper {
/** /**
* Helper class, which generates the hashcode while reading the stream e.g. for parsing the document. This allows * Helper class, which generates the hashcode while reading the stream e.g. for parsing the document. This allows
* generating the hashcode without an aditional reading step. * generating the hashcode without an additional reading step.
*/ */
@SuppressWarnings("squid:S4929") // efficient read is done by internally used stream @SuppressWarnings("squid:S4929") // efficient read is done by internally used stream
private static class DigestingInputStream extends FilterInputStream { private static class DigestingInputStream extends FilterInputStream {
@ -96,15 +97,15 @@ public class StreamHelper {
private final LazyReadInput reference; private final LazyReadInput reference;
public CountInputStream(final LazyReadInput input, final InputStream stream) { public CountInputStream(final LazyReadInput input, final InputStream stream) throws IOException {
super(new org.apache.commons.io.input.CountingInputStream(stream)); super(BoundedInputStream.builder().setInputStream(stream).get());
this.reference = input; this.reference = input;
} }
@Override @Override
public void close() throws IOException { public void close() throws IOException {
super.close(); super.close();
this.reference.setLength(((CountingInputStream) this.in).getByteCount()); this.reference.setLength(((BoundedInputStream) this.in).getCount());
} }
} }
@ -130,19 +131,24 @@ public class StreamHelper {
/** /**
* Wraps the {@link InputStream} with a counting length implementation. * Wraps the {@link InputStream} with a counting length implementation.
* *
* @param input the {@link LazyReadInput input} * @param input the lazy read input
* @param stream the stream * @param stream the stream
* @return a wrapped stream * @return a wrapped stream
*/ */
public static InputStream wrapCount(final LazyReadInput input, final InputStream stream) { public static InputStream wrapCount(final LazyReadInput input, final InputStream stream) {
try {
return new CountInputStream(input, stream); return new CountInputStream(input, stream);
} catch (final IOException ex) {
throw new UncheckedIOException(ex);
}
} }
/** /**
* Wraps the {@link InputStream} with an implementation the generates a hash sum over the stream data. * Wraps the {@link InputStream} with an implementation the generates a hash sum over the stream data.
* *
* @param input the {@link LazyReadInput input} * @param input the lazy read input
* @param stream the stream * @param stream the stream
* @param digestAlgorithm the message digest algorithm to use
* @return a wrapped stream * @return a wrapped stream
*/ */
public static InputStream wrapDigesting(final LazyReadInput input, final InputStream stream, final String digestAlgorithm) { public static InputStream wrapDigesting(final LazyReadInput input, final InputStream stream, final String digestAlgorithm) {
@ -175,7 +181,7 @@ public class StreamHelper {
* @param input the input * @param input the input
* @throws IOException on I/O errors * @throws IOException on I/O errors
*/ */
@SuppressWarnings("squid:S1854") @SuppressWarnings({ "squid:S1854", "unused" })
public static void drain(final InputStream input) throws IOException { public static void drain(final InputStream input) throws IOException {
final byte[] buffer = new byte[DEFAULT_BUFFER_SIZE]; final byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];

View file

@ -0,0 +1,41 @@
package de.kosit.validationtool.impl.model;
import java.util.Objects;
import org.oclc.purl.dsdl.svrl.FailedAssert;
import de.kosit.validationtool.model.scenarios.ErrorLevelType;
/**
* This class contains a single Schematron failed assertion that has a custom error level.
*
* @since 1.6.0
*/
public class CustomFailedAssert {
private final FailedAssert originalFailedAssert;
private final ErrorLevelType customLevelFlag;
/**
* Constructor
*
* @param failedAssert The failed assert from Schematron. May not be <code>null</code>.
* @param customLevelFlag The custom error level. May not be <code>null</code>.
*/
public CustomFailedAssert(final FailedAssert failedAssert, final ErrorLevelType customLevelFlag) {
Objects.requireNonNull(failedAssert);
Objects.requireNonNull(customLevelFlag);
this.originalFailedAssert = failedAssert;
this.customLevelFlag = customLevelFlag;
}
public FailedAssert getFailedAssert() {
return this.originalFailedAssert;
}
public ErrorLevelType getCustomLevelFlag() {
return this.customLevelFlag;
}
}

View file

@ -17,8 +17,8 @@
package de.kosit.validationtool.impl.model; package de.kosit.validationtool.impl.model;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.List;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
@ -37,14 +37,14 @@ public class Result<T, E> {
private T object; private T object;
private Collection<E> errors = new ArrayList<>(); private List<E> errors = new ArrayList<>();
/** /**
* Erzeugt ein neues Ergebnis mit Fehler * Erzeugt ein neues Ergebnis mit Fehler
* *
* @param errors die Fehler * @param errors die Fehler
*/ */
public Result(Collection<E> errors) { public Result(final List<E> errors) {
this(null, errors); this(null, errors);
} }
@ -53,7 +53,7 @@ public class Result<T, E> {
* *
* @param o * @param o
*/ */
public Result(T o) { public Result(final T o) {
this(o, Collections.emptyList()); this(o, Collections.emptyList());
} }

View file

@ -21,10 +21,6 @@ import java.util.Collections;
import org.apache.commons.io.FilenameUtils; import org.apache.commons.io.FilenameUtils;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
import de.kosit.validationtool.api.AcceptRecommendation; import de.kosit.validationtool.api.AcceptRecommendation;
import de.kosit.validationtool.api.Input; import de.kosit.validationtool.api.Input;
import de.kosit.validationtool.impl.Scenario; import de.kosit.validationtool.impl.Scenario;
@ -32,7 +28,9 @@ import de.kosit.validationtool.impl.model.Result;
import de.kosit.validationtool.model.reportInput.CreateReportInput; import de.kosit.validationtool.model.reportInput.CreateReportInput;
import de.kosit.validationtool.model.reportInput.ProcessingError; import de.kosit.validationtool.model.reportInput.ProcessingError;
import de.kosit.validationtool.model.reportInput.XMLSyntaxError; import de.kosit.validationtool.model.reportInput.XMLSyntaxError;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
import net.sf.saxon.s9api.XdmNode; import net.sf.saxon.s9api.XdmNode;
/** /**
@ -55,9 +53,9 @@ public interface CheckAction {
private Result<Scenario, String> scenarioSelectionResult; private Result<Scenario, String> scenarioSelectionResult;
@Setter(AccessLevel.NONE) @Setter(AccessLevel.NONE)
private CreateReportInput reportInput; private final CreateReportInput reportInput;
/** Das finale Ergebnis */ /** The final result */
private XdmNode report; private XdmNode report;
private boolean finished; private boolean finished;
@ -66,7 +64,7 @@ public interface CheckAction {
private AcceptRecommendation acceptStatus = AcceptRecommendation.UNDEFINED; private AcceptRecommendation acceptStatus = AcceptRecommendation.UNDEFINED;
/** Das zu prüfende Dokument */ /** The document to validate */
private Input input; private Input input;
private Result<XdmNode, XMLSyntaxError> parserResult; private Result<XdmNode, XMLSyntaxError> parserResult;
@ -85,7 +83,9 @@ public interface CheckAction {
} }
/** /**
* Signalisiert einen vorzeitigen Stop der Vearbeitung. * Indicates an early stop in processing.
*
* @param error Error text
*/ */
public void stopProcessing(final String error) { public void stopProcessing(final String error) {
stopProcessing(Collections.singleton(error)); stopProcessing(Collections.singleton(error));

View file

@ -20,9 +20,9 @@ import java.io.IOException;
import java.util.Collection; import java.util.Collection;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javax.xml.bind.JAXBException; import jakarta.xml.bind.JAXBException;
import javax.xml.bind.Marshaller; import jakarta.xml.bind.Marshaller;
import javax.xml.bind.util.JAXBSource; import jakarta.xml.bind.util.JAXBSource;
import org.xml.sax.ContentHandler; import org.xml.sax.ContentHandler;
import org.xml.sax.DTDHandler; import org.xml.sax.DTDHandler;

View file

@ -17,19 +17,18 @@
package de.kosit.validationtool.impl.tasks; package de.kosit.validationtool.impl.tasks;
import java.io.IOException; import java.io.IOException;
import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import de.kosit.validationtool.api.Input; import de.kosit.validationtool.api.Input;
import de.kosit.validationtool.impl.input.XdmNodeInput; import de.kosit.validationtool.impl.input.XdmNodeInput;
import de.kosit.validationtool.impl.model.Result; import de.kosit.validationtool.impl.model.Result;
import de.kosit.validationtool.model.reportInput.ValidationResultsWellformedness; import de.kosit.validationtool.model.reportInput.ValidationResultsWellformedness;
import de.kosit.validationtool.model.reportInput.XMLSyntaxError; import de.kosit.validationtool.model.reportInput.XMLSyntaxError;
import de.kosit.validationtool.model.reportInput.XMLSyntaxErrorSeverity; import de.kosit.validationtool.model.reportInput.XMLSyntaxErrorSeverity;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import net.sf.saxon.s9api.DocumentBuilder; import net.sf.saxon.s9api.DocumentBuilder;
import net.sf.saxon.s9api.Processor; import net.sf.saxon.s9api.Processor;
import net.sf.saxon.s9api.SaxonApiException; import net.sf.saxon.s9api.SaxonApiException;
@ -75,7 +74,7 @@ public class DocumentParseAction implements CheckAction {
final XMLSyntaxError error = new XMLSyntaxError(); final XMLSyntaxError error = new XMLSyntaxError();
error.setSeverityCode(XMLSyntaxErrorSeverity.SEVERITY_FATAL_ERROR); error.setSeverityCode(XMLSyntaxErrorSeverity.SEVERITY_FATAL_ERROR);
error.setMessage(String.format("IOException while reading resource %s: %s", content.getName(), e.getMessage())); error.setMessage(String.format("IOException while reading resource %s: %s", content.getName(), e.getMessage()));
result = new Result<>(Collections.singleton(error)); result = new Result<>(Arrays.asList(error));
} }
return result; return result;

View file

@ -31,12 +31,6 @@ import javax.xml.validation.Validator;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.xml.sax.SAXException; import org.xml.sax.SAXException;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import de.kosit.validationtool.api.Input; import de.kosit.validationtool.api.Input;
import de.kosit.validationtool.impl.CollectingErrorEventHandler; import de.kosit.validationtool.impl.CollectingErrorEventHandler;
import de.kosit.validationtool.impl.Scenario; import de.kosit.validationtool.impl.Scenario;
@ -45,7 +39,11 @@ import de.kosit.validationtool.impl.model.Result;
import de.kosit.validationtool.model.reportInput.CreateReportInput; import de.kosit.validationtool.model.reportInput.CreateReportInput;
import de.kosit.validationtool.model.reportInput.ValidationResultsXmlSchema; import de.kosit.validationtool.model.reportInput.ValidationResultsXmlSchema;
import de.kosit.validationtool.model.reportInput.XMLSyntaxError; import de.kosit.validationtool.model.reportInput.XMLSyntaxError;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import net.sf.saxon.s9api.Processor; import net.sf.saxon.s9api.Processor;
import net.sf.saxon.s9api.SaxonApiException; import net.sf.saxon.s9api.SaxonApiException;
import net.sf.saxon.s9api.Serializer; import net.sf.saxon.s9api.Serializer;
@ -216,7 +214,7 @@ public class SchemaValidationAction implements CheckAction {
} }
} }
private interface SerializedDocument extends AutoCloseable, SourceProvider { private interface SerializedDocument extends SourceProvider {
void serialize(XdmNode node) throws SaxonApiException, IOException; void serialize(XdmNode node) throws SaxonApiException, IOException;

View file

@ -22,7 +22,7 @@ import java.io.Reader;
import java.net.URI; import java.net.URI;
import java.net.URL; import java.net.URL;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Strings;
import org.w3c.dom.ls.LSInput; import org.w3c.dom.ls.LSInput;
import org.w3c.dom.ls.LSResourceResolver; import org.w3c.dom.ls.LSResourceResolver;
@ -90,7 +90,7 @@ public class ClassPathResourceResolver implements LSResourceResolver {
* @param basePath der Basispfad * @param basePath der Basispfad
*/ */
public ClassPathResourceResolver(final String basePath) { public ClassPathResourceResolver(final String basePath) {
if (!StringUtils.startsWith(basePath, "/")) { if (!Strings.CS.startsWith(basePath, "/")) {
throw new IllegalArgumentException("Base path must start with a slash"); throw new IllegalArgumentException("Base path must start with a slash");
} }
this.base = URI.create(basePath + (basePath.endsWith("/") == basePath.length() > 1 ? "" : "/")); this.base = URI.create(basePath + (basePath.endsWith("/") == basePath.length() > 1 ? "" : "/"));

View file

@ -26,7 +26,6 @@ import javax.xml.transform.URIResolver;
import javax.xml.transform.stream.StreamSource; import javax.xml.transform.stream.StreamSource;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import net.sf.saxon.Configuration; import net.sf.saxon.Configuration;
import net.sf.saxon.lib.StandardUnparsedTextResolver; import net.sf.saxon.lib.StandardUnparsedTextResolver;
import net.sf.saxon.lib.UnparsedTextURIResolver; import net.sf.saxon.lib.UnparsedTextURIResolver;
@ -54,10 +53,9 @@ public class RelativeUriResolver implements URIResolver, UnparsedTextURIResolver
throw new TransformerException(String.format("Can not resolve required %s", href), e); throw new TransformerException(String.format("Can not resolve required %s", href), e);
} }
} else {
throw new TransformerException(String
.format("The resolved transformation artifact %s is not within the configured repository %s", resolved, this.baseUri));
} }
throw new TransformerException(String.format("The resolved transformation artifact %s is not within the configured repository %s",
resolved, this.baseUri));
} }
/** /**
@ -96,10 +94,9 @@ public class RelativeUriResolver implements URIResolver, UnparsedTextURIResolver
public Reader resolve(final URI absoluteURI, final String encoding, final Configuration config) throws XPathException { public Reader resolve(final URI absoluteURI, final String encoding, final Configuration config) throws XPathException {
if (isUnderBaseUri(absoluteURI, this.baseUri)) { if (isUnderBaseUri(absoluteURI, this.baseUri)) {
return new StandardUnparsedTextResolver().resolve(absoluteURI, encoding, config); return new StandardUnparsedTextResolver().resolve(absoluteURI, encoding, config);
} else { }
throw new XPathException(String.format("The resolved transformation artifact %s is not within the configured repository %s", throw new XPathException(String.format("The resolved transformation artifact %s is not within the configured repository %s",
absoluteURI, this.baseUri)); absoluteURI, this.baseUri));
} }
}
} }

View file

@ -16,7 +16,7 @@
package de.kosit.validationtool.impl.xml; package de.kosit.validationtool.impl.xml;
import javax.xml.bind.annotation.adapters.XmlAdapter; import jakarta.xml.bind.annotation.adapters.XmlAdapter;
public class StringTrimAdapter extends XmlAdapter<String, String> { public class StringTrimAdapter extends XmlAdapter<String, String> {

View file

@ -18,20 +18,19 @@
<jaxb:bindings <jaxb:bindings
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
xmlns:inheritance="http://jaxb2-commons.dev.java.net/basic/inheritance" xmlns:inheritance="urn:jaxb.jvnet.org:plugin:inheritance"
jaxb:extensionBindingPrefixes="inheritance" jaxb:extensionBindingPrefixes="inheritance"
version="2.1"> version="3.0">
<jaxb:globalBindings> <jaxb:globalBindings>
<xjc:serializable uid="-1"/> <xjc:serializable uid="-1"/>
<xjc:javaType <xjc:javaType
name="java.lang.String" name="java.lang.String"
xmlType="xs:string" xmlType="xs:string"
adapter="de.kosit.validationtool.impl.xml.StringTrimAdapter"/> adapter="de.kosit.validationtool.impl.xml.StringTrimAdapter"/>
</jaxb:globalBindings> </jaxb:globalBindings>
<jaxb:bindings schemaLocation="../xsd/createReportInput.xsd"> <jaxb:bindings schemaLocation="../xsd/createReportInput.xsd">
<jaxb:schemaBindings> <jaxb:schemaBindings>
<jaxb:package name="de.kosit.validationtool.model.reportInput"/> <jaxb:package name="de.kosit.validationtool.model.reportInput"/>
@ -40,21 +39,25 @@
<inheritance:extends>de.kosit.validationtool.impl.model.BaseXMLSyntaxError</inheritance:extends> <inheritance:extends>de.kosit.validationtool.impl.model.BaseXMLSyntaxError</inheritance:extends>
</jaxb:bindings> </jaxb:bindings>
</jaxb:bindings> </jaxb:bindings>
<jaxb:bindings schemaLocation="../xsd/scenarios.xsd"> <jaxb:bindings schemaLocation="../xsd/scenarios.xsd">
<jaxb:schemaBindings> <jaxb:schemaBindings>
<jaxb:package name="de.kosit.validationtool.model.scenarios"/> <jaxb:package name="de.kosit.validationtool.model.scenarios"/>
</jaxb:schemaBindings> </jaxb:schemaBindings>
</jaxb:bindings> </jaxb:bindings>
<jaxb:bindings schemaLocation="../xsd/assertions.xsd"> <jaxb:bindings schemaLocation="../xsd/assertions.xsd">
<jaxb:schemaBindings> <jaxb:schemaBindings>
<jaxb:package name="de.kosit.validationtool.cmd.assertions"/> <jaxb:package name="de.kosit.validationtool.cmd.assertions"/>
</jaxb:schemaBindings> </jaxb:schemaBindings>
</jaxb:bindings> </jaxb:bindings>
<jaxb:bindings schemaLocation="../xsd/svrl-kosit.xsd"> <jaxb:bindings schemaLocation="../xsd/svrl-kosit.xsd">
<jaxb:bindings node="//xs:element[@name='schematron-output']/xs:complexType"> <jaxb:bindings node="//xs:element[@name='schematron-output']/xs:complexType">
<inheritance:extends>de.kosit.validationtool.impl.model.BaseOutput</inheritance:extends> <inheritance:extends>de.kosit.validationtool.impl.model.BaseOutput</inheritance:extends>
</jaxb:bindings> </jaxb:bindings>
</jaxb:bindings> </jaxb:bindings>
<jaxb:bindings schemaLocation="../xsd/daemon.xsd"> <jaxb:bindings schemaLocation="../xsd/daemon.xsd">
<jaxb:schemaBindings> <jaxb:schemaBindings>
<jaxb:package name="de.kosit.validationtool.model.daemon"/> <jaxb:package name="de.kosit.validationtool.model.daemon"/>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
"use strict";(self.webpackChunkvalidator_frontend=self.webpackChunkvalidator_frontend||[]).push([[849],{6164:function(e){e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"Configurations","href":"/docs/configurations","docId":"configurations","unlisted":false},{"type":"link","label":"API Usage","href":"/docs/api","docId":"api","unlisted":false},{"type":"link","label":"Changelog","href":"/docs/changelog","docId":"changelog","unlisted":false}]},"docs":{"api":{"id":"api","title":"API Usage","description":"The validation service listens to POST-requests to any server uri. You need to supply the xml/object to validate in","sidebar":"tutorialSidebar"},"changelog":{"id":"changelog","title":"Changelog","description":"All notable changes to this project will be documented in this file.","sidebar":"tutorialSidebar"},"configurations":{"id":"configurations","title":"Configurations","description":"The validator needs a scenario configuration for working properly.","sidebar":"tutorialSidebar"}}}}')}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
"use strict";(self.webpackChunkvalidator_frontend=self.webpackChunkvalidator_frontend||[]).push([[237],{8451:function(e,t,a){a.r(t),a.d(t,{default:function(){return N}});var l=a(7294),n=a(6010),r=a(7462),i=a(8523),o={dropzone:"dropzone_p8R5",active:"active_ajsO",hasFiles:"hasFiles_h6nl",fileHoverPreview:"fileHoverPreview_IJ6m",icon:"icon_Zdm0",fileHoverIcon:"fileHoverIcon_TFrZ",uploadIcon:"uploadIcon__9vU"};var c=e=>{let{accept:t,children:a,className:c,activeClassName:s,multiple:d=!1,name:m,onDrop:p,hasSelectedFiles:u,...v}=e;const{getRootProps:h,getInputProps:f,isDragActive:E,isDragAccept:g,isDragReject:Z}=(0,i.uI)({accept:t,multiple:d,onDrop:(e,t,a)=>{const l=t.map((e=>e.file));p(e,l,a)},...v});return l.createElement("div",(0,r.Z)({},h(),{className:(0,n.Z)(o.dropzone,E&&o.active,u&&o.hasFiles,c,E&&s),"data-testid":"dropzone","data-is-drag-active":E,"data-is-drag-accepted":g,"data-is-drag-rejected":Z,"data-has-files":u}),l.createElement("div",{className:(0,n.Z)(o.fileHoverPreview,E&&o.previewActive)},l.createElement("svg",{className:(0,n.Z)(o.icon,o.fileHoverIcon),fill:"currentColor","aria-hidden":"true",viewBox:"0 0 24 24"},l.createElement("path",{d:"M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"}))),l.createElement("svg",{className:(0,n.Z)(o.icon,o.uploadIcon),fill:"currentColor","aria-hidden":"true",viewBox:"0 0 24 24"},l.createElement("path",{d:"M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z"})),a,l.createElement("input",(0,r.Z)({name:m},f(),{"data-testid":"dropzone-input"})))},s=a(5833),d=a(7547),m=a(7506),p="button__Owf",u="spinnerWrapper_KcTt",v="loading_FTzi",h="spinner_hC2W";var f=function(e){let{children:t,type:a="button",className:i,loading:o=!1,...c}=e;return l.createElement("button",(0,r.Z)({},c,{className:(0,n.Z)(p,o&&v,i),type:a,"aria-busy":o}),l.createElement("div",{className:u,"aria-hidden":!0},l.createElement("div",{className:h})),t)},E="buttonGroup__nLk",g="resultDisplay_JbbN",Z="withError_Jabi";const _={"text/xml":[".xml",".XML"],"application/xml":[".xml",".XML"]};var b=function(){const[e,t]=(0,l.useState)(null),[a,r]=(0,l.useState)([]),{data:i,error:o,request:p,status:u}=(0,m.Z)(),v=(0,l.useCallback)(((e,a)=>{e.length?(t(e[0]),r([])):r(a)}),[]),h=!!o&&[406,422].includes(o.code);return l.createElement(l.Fragment,null,l.createElement("form",{onSubmit:t=>{t.preventDefault(),e&&p("/",{method:"POST",headers:{"Content-Type":"application/xml"},body:e,redirect:"follow"})}},u===m.e.Failure&&o&&!h&&l.createElement(d.Z,{title:"An error occurred while validating the file"},l.createElement(s.Z,{enableCopy:!0},o.message)),a.length>1&&l.createElement(d.Z,{title:"Please select a single file only"}),1===a.length&&l.createElement(d.Z,{title:"Only XML files are supported"},l.createElement(s.Z,null,`Invalid file found: ${a[0].name}`)),l.createElement(c,{onDrop:v,accept:_,multiple:!1,hasSelectedFiles:!!e},e?e.name:l.createElement(l.Fragment,null,"Drag & drop files here or click to select a file")),l.createElement("div",{className:E},l.createElement(f,{type:"submit",disabled:!e,loading:u===m.e.Loading},"Validate"))),(i&&u===m.e.Success||h)&&l.createElement("div",{className:(0,n.Z)(g,h&&Z)},l.createElement(s.Z,{download:{fileName:(b=null==e?void 0:e.name,b?`${b.replace(/\.xml$/i,"")}-report.xml`:"report.xml"),mime:"application/xml"},enableCopy:!0},i||(null==o?void 0:o.message)||"")));var b},y=a(8222);function N(){return l.createElement(y.Z,{layoutDescription:"KoSIT Validator Daemon",headline:"Try the validator!",description:"Upload an XML file here to validate its contents. Note: this is just a demo implementation, not meant for production usage. If you need a production ready implementation you are welcome to contribute to the open source project."},l.createElement(b,null))}}}]);

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
"use strict";(self.webpackChunkvalidator_frontend=self.webpackChunkvalidator_frontend||[]).push([[61],{7973:function(e,a,t){t.r(a),t.d(a,{default:function(){return x}});t(6540);var s=t(4164),d=t(5500),r=t(7559),n=t(1656),i=t(3253),l=t(7763),c=t(6896),o=t(2153),m={mdxPageWrapper:"mdxPageWrapper_j9I6"},p=t(4848);function x(e){const{content:a}=e,{metadata:t,assets:x}=a,{title:g,editUrl:h,description:j,frontMatter:_,lastUpdatedBy:f,lastUpdatedAt:u}=t,{keywords:v,wrapperClassName:A,hide_table_of_contents:w}=_,N=x.image??_.image,k=!!(h||u||f);return(0,p.jsx)(d.e3,{className:(0,s.A)(A??r.G.wrapper.mdxPages,r.G.page.mdxPage),children:(0,p.jsxs)(n.A,{children:[(0,p.jsx)(d.be,{title:g,description:j,keywords:v,image:N}),(0,p.jsx)("main",{className:"container container--fluid margin-vert--lg",children:(0,p.jsxs)("div",{className:(0,s.A)("row",m.mdxPageWrapper),children:[(0,p.jsxs)("div",{className:(0,s.A)("col",!w&&"col--8"),children:[(0,p.jsx)(c.A,{metadata:t}),(0,p.jsx)("article",{children:(0,p.jsx)(i.A,{children:(0,p.jsx)(a,{})})}),k&&(0,p.jsx)(o.A,{className:(0,s.A)("margin-top--sm",r.G.pages.pageFooterEditMetaRow),editUrl:h,lastUpdatedAt:u,lastUpdatedBy:f})]}),!w&&a.toc.length>0&&(0,p.jsx)("div",{className:"col col--2",children:(0,p.jsx)(l.A,{toc:a.toc,minHeadingLevel:_.toc_min_heading_level,maxHeadingLevel:_.toc_max_heading_level})})]})})]})})}}}]);

View file

@ -1 +0,0 @@
"use strict";(self.webpackChunkvalidator_frontend=self.webpackChunkvalidator_frontend||[]).push([[85],{4247:function(e,t,a){a.r(t),a.d(t,{default:function(){return s}});var n=a(7294),l=a(6010),c=a(1944),r=a(5281),i=a(3285),m=a(9254),o=a(9407),d="mdxPageWrapper_j9I6";function s(e){const{content:t}=e,{metadata:{title:a,description:s,frontMatter:u}}=t,{wrapperClassName:p,hide_table_of_contents:_}=u;return n.createElement(c.FG,{className:(0,l.Z)(p??r.k.wrapper.mdxPages,r.k.page.mdxPage)},n.createElement(c.d,{title:a,description:s}),n.createElement(i.Z,null,n.createElement("main",{className:"container container--fluid margin-vert--lg"},n.createElement("div",{className:(0,l.Z)("row",d)},n.createElement("div",{className:(0,l.Z)("col",!_&&"col--8")},n.createElement("article",null,n.createElement(m.Z,null,n.createElement(t,null)))),!_&&t.toc.length>0&&n.createElement("div",{className:"col col--2"},n.createElement(o.Z,{toc:t.toc,minHeadingLevel:u.toc_min_heading_level,maxHeadingLevel:u.toc_max_heading_level}))))))}}}]);

View file

@ -0,0 +1 @@
"use strict";(self.webpackChunkvalidator_frontend=self.webpackChunkvalidator_frontend||[]).push([[237],{2237:function(e,t,n){n.r(t),n.d(t,{default:function(){return d}});n(6540);var i=n(1312),o=n(5500),r=n(1656),a=n(3363),s=n(4848);function d(){const e=(0,i.T)({id:"theme.NotFound.title",message:"Page Not Found"});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.be,{title:e}),(0,s.jsx)(r.A,{children:(0,s.jsx)(a.A,{})})]})}},3363:function(e,t,n){n.d(t,{A:function(){return s}});n(6540);var i=n(4164),o=n(1312),r=n(1107),a=n(4848);function s({className:e}){return(0,a.jsx)("main",{className:(0,i.A)("container margin-vert--xl",e),children:(0,a.jsx)("div",{className:"row",children:(0,a.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,a.jsx)(r.A,{as:"h1",className:"hero__title",children:(0,a.jsx)(o.A,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,a.jsx)("p",{children:(0,a.jsx)(o.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,a.jsx)("p",{children:(0,a.jsx)(o.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}}}]);

View file

@ -1 +0,0 @@
"use strict";(self.webpackChunkvalidator_frontend=self.webpackChunkvalidator_frontend||[]).push([[414],{3123:function(e,t,n){n.r(t),n.d(t,{contentTitle:function(){return p},default:function(){return u},frontMatter:function(){return r},metadata:function(){return d},toc:function(){return i}});var a=n(7462),o=(n(7294),n(3905));const r={title:"Markdown page example"},p="Markdown page example",d={type:"mdx",permalink:"/markdown-page",source:"@site/src/pages/markdown-page.md",title:"Markdown page example",description:"You don't need React to write simple standalone pages.",frontMatter:{title:"Markdown page example"}},i=[],l={toc:i};function u(e){let{components:t,...n}=e;return(0,o.kt)("wrapper",(0,a.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"markdown-page-example"},"Markdown page example"),(0,o.kt)("p",null,"You don't need React to write simple standalone pages."))}u.isMDXComponent=!0}}]);

View file

@ -0,0 +1 @@
"use strict";(self.webpackChunkvalidator_frontend=self.webpackChunkvalidator_frontend||[]).push([[134],{591:function(e,n,t){t.r(n),t.d(n,{assets:function(){return i},contentTitle:function(){return s},default:function(){return d},frontMatter:function(){return c},metadata:function(){return r},toc:function(){return u}});var r=JSON.parse('{"type":"mdx","permalink":"/markdown-page","source":"@site/src/pages/markdown-page.md","title":"Markdown page example","description":"You don\'t need React to write simple standalone pages.","frontMatter":{"title":"Markdown page example"},"unlisted":false}'),o=t(4848),a=t(8453);const c={title:"Markdown page example"},s="Markdown page example",i={},u=[];function p(e){const n={h1:"h1",header:"header",p:"p",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"markdown-page-example",children:"Markdown page example"})}),"\n",(0,o.jsx)(n.p,{children:"You don't need React to write simple standalone pages."})]})}function d(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(p,{...e})}):p(e)}},8453:function(e,n,t){t.d(n,{R:function(){return c},x:function(){return s}});var r=t(6540);const o={},a=r.createContext(o);function c(e){const n=r.useContext(a);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:c(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]);

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
"use strict";(self.webpackChunkvalidator_frontend=self.webpackChunkvalidator_frontend||[]).push([[611],{7663:function(n,i,e){e.r(i),e.d(i,{assets:function(){return c},contentTitle:function(){return a},default:function(){return d},frontMatter:function(){return s},metadata:function(){return t},toc:function(){return l}});var t=JSON.parse('{"id":"configurations","title":"Configurations","description":"The validator needs a scenario configuration for working properly.","source":"@site/docs/configurations.md","sourceDirName":".","slug":"/configurations","permalink":"/docs/configurations","draft":false,"unlisted":false,"editUrl":"https://github.com/itplr-kosit/validator/server/ui/docs/configurations.md","tags":[],"version":"current","sidebarPosition":1,"frontMatter":{"sidebar_position":1},"sidebar":"tutorialSidebar","next":{"title":"API Usage","permalink":"/docs/api"}}'),o=e(4848),r=e(8453);const s={sidebar_position:1},a="Configurations",c={},l=[];function u(n){const i={a:"a",h1:"h1",header:"header",li:"li",p:"p",ul:"ul",...(0,r.R)(),...n.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i.header,{children:(0,o.jsx)(i.h1,{id:"configurations",children:"Configurations"})}),"\n",(0,o.jsx)(i.p,{children:"The validator needs a scenario configuration for working properly."}),"\n",(0,o.jsx)(i.p,{children:"Here are some public validation configurations:"}),"\n",(0,o.jsxs)(i.ul,{children:["\n",(0,o.jsxs)(i.li,{children:["Validation Configuration for ",(0,o.jsx)(i.a,{href:"https://xeinkauf.de/xrechnung/",children:"XRechnung"}),":","\n",(0,o.jsxs)(i.ul,{children:["\n",(0,o.jsxs)(i.li,{children:["Source code is available on ",(0,o.jsx)(i.a,{href:"https://github.com/itplr-kosit/validator-configuration-xrechnung",children:"GitHub"})]}),"\n",(0,o.jsxs)(i.li,{children:[(0,o.jsx)(i.a,{href:"https://github.com/itplr-kosit/validator-configuration-xrechnung/releases",children:"Releases"})," can also be downloaded"]}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(i.li,{children:["Validation Configuration for ",(0,o.jsx)(i.a,{href:"https://docs.peppol.eu/poacc/billing/3.0/",children:"Peppol BIS Billing"}),":","\n",(0,o.jsxs)(i.ul,{children:["\n",(0,o.jsxs)(i.li,{children:["Source code is available on ",(0,o.jsx)(i.a,{href:"https://github.com/itplr-kosit/validator-configuration-bis",children:"GitHub"})]}),"\n",(0,o.jsxs)(i.li,{children:[(0,o.jsx)(i.a,{href:"https://github.com/itplr-kosit/validator-configuration-bis/releases",children:"Releases"})," can also be downloaded"]}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(i.li,{children:["Validation Configuration for ",(0,o.jsx)(i.a,{href:"https://xgewerbeanzeige.de/",children:"XGewerbeanzeige"}),"\n",(0,o.jsxs)(i.ul,{children:["\n",(0,o.jsxs)(i.li,{children:["Source code is available on ",(0,o.jsx)(i.a,{href:"https://github.com/itplr-kosit/validator-configuration-xgewerbeanzeige",children:"GitHub"})]}),"\n",(0,o.jsxs)(i.li,{children:[(0,o.jsx)(i.a,{href:"https://github.com/itplr-kosit/validator-configuration-xgewerbeanzeige/releases",children:"Releases"})," can also be downloaded"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(i.p,{children:["For creating custom configurations\nsee ",(0,o.jsx)(i.a,{href:"https://github.com/itplr-kosit/validator/blob/main/docs/configurations.md",children:"configuration documentation"}),"\nfor details"]})]})}function d(n={}){const{wrapper:i}={...(0,r.R)(),...n.components};return i?(0,o.jsx)(i,{...n,children:(0,o.jsx)(u,{...n})}):u(n)}},8453:function(n,i,e){e.d(i,{R:function(){return s},x:function(){return a}});var t=e(6540);const o={},r=t.createContext(o);function s(n){const i=t.useContext(r);return t.useMemo(function(){return"function"==typeof n?n(i):{...i,...n}},[i,n])}function a(n){let i;return i=n.disableParentContext?"function"==typeof n.components?n.components(o):n.components||o:s(n.components),t.createElement(r.Provider,{value:i},n.children)}}}]);

View file

@ -1 +0,0 @@
"use strict";(self.webpackChunkvalidator_frontend=self.webpackChunkvalidator_frontend||[]).push([[910],{809:function(t,e,i){i.r(e),i.d(e,{assets:function(){return u},contentTitle:function(){return r},default:function(){return d},frontMatter:function(){return o},metadata:function(){return l},toc:function(){return s}});var n=i(7462),a=(i(7294),i(3905));const o={sidebar_position:1},r="Configurations",l={unversionedId:"configurations",id:"configurations",title:"Configurations",description:"The validator needs a scenario configuration for working properly.",source:"@site/docs/configurations.md",sourceDirName:".",slug:"/configurations",permalink:"/docs/configurations",draft:!1,editUrl:"https://github.com/itplr-kosit/validator/server/ui/docs/configurations.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",next:{title:"API Usage",permalink:"/docs/api"}},u={},s=[],c={toc:s};function d(t){let{components:e,...i}=t;return(0,a.kt)("wrapper",(0,n.Z)({},c,i,{components:e,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"configurations"},"Configurations"),(0,a.kt)("p",null,"The validator needs a scenario configuration for working properly."),(0,a.kt)("p",null,"Currently, there are two public third party validation configurations available."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Validation Configuration for ",(0,a.kt)("a",{parentName:"li",href:"http://www.xoev.de/de/xrechnung"},"XRechnung"),":",(0,a.kt)("ul",{parentName:"li"},(0,a.kt)("li",{parentName:"ul"},"Source code is available on ",(0,a.kt)("a",{parentName:"li",href:"https://github.com/itplr-kosit/validator-configuration-xrechnung"},"GitHub")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/itplr-kosit/validator-configuration-xrechnung/releases"},"Releases")," can also be downloaded"))),(0,a.kt)("li",{parentName:"ul"},"Validation Configuration for ",(0,a.kt)("a",{parentName:"li",href:"https://xgewerbeanzeige.de/"},"XGewerbeanzeige"),(0,a.kt)("ul",{parentName:"li"},(0,a.kt)("li",{parentName:"ul"},"Source code is available on ",(0,a.kt)("a",{parentName:"li",href:"https://github.com/itplr-kosit/validator-configuration-xgewerbeanzeige"},"GitHub")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/itplr-kosit/validator-configuration-xgewerbeanzeige/releases"},"Releases")," can also be downloaded")))),(0,a.kt)("p",null,"For creating custom configurations\nsee ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/itplr-kosit/validator/blob/master/docs/configurations.md"},"configuration documentation"),"\nfor details"))}d.isMDXComponent=!0}}]);

View file

@ -0,0 +1 @@
"use strict";(self.webpackChunkvalidator_frontend=self.webpackChunkvalidator_frontend||[]).push([[647],{7121:function(e,r,n){n.r(r),n.d(r,{default:function(){return d}});n(6540);var t=n(4164),a=n(7559),s=n(5500),u=n(2831),c=n(1656),o=n(4848);function d(e){return(0,o.jsx)(s.e3,{className:(0,t.A)(a.G.wrapper.docsPages),children:(0,o.jsx)(c.A,{children:(0,u.v)(e.route.routes)})})}}}]);

View file

@ -1 +0,0 @@
"use strict";(self.webpackChunkvalidator_frontend=self.webpackChunkvalidator_frontend||[]).push([[207],{7480:function(e,t,n){n.r(t),n.d(t,{assets:function(){return l},contentTitle:function(){return o},default:function(){return c},frontMatter:function(){return r},metadata:function(){return s},toc:function(){return p}});var a=n(7462),i=(n(7294),n(3905));const r={sidebar_position:2},o="API Usage",s={unversionedId:"api",id:"api",title:"API Usage",description:"The validation service listens to POST-requests to any server uri. You need to supply the xml/object to validate in",source:"@site/docs/api.md",sourceDirName:".",slug:"/api",permalink:"/docs/api",draft:!1,editUrl:"https://github.com/itplr-kosit/validator/server/ui/docs/api.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Configurations",permalink:"/docs/configurations"},next:{title:"Changelog",permalink:"/docs/changelog"}},l={},p=[],u={toc:p};function c(e){let{components:t,...n}=e;return(0,i.kt)("wrapper",(0,a.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"api-usage"},"API Usage"),(0,i.kt)("p",null,"The validation service listens to ",(0,i.kt)("inlineCode",{parentName:"p"},"POST"),"-requests to any server uri. You need to supply the xml/object to validate in\nthe post body.\nThe service expects a single plain input in the post body, e.g. ",(0,i.kt)("inlineCode",{parentName:"p"},"multipart/form-data")," is not supported."),(0,i.kt)("p",null,"Examples:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"cURL"))),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-shell",metastring:"script",script:!0},"curl --location --request POST 'http://localhost:8080' \\\n--header 'Content-Type: application/xml' \\\n--data-binary '@/target.xml'\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"java")," (Apache HttpClient)")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-java"},'HttpClient httpClient=HttpClientBuilder.create().build();\n HttpPost postRequest=new HttpPost("http://localhost:8080/");\n FileEntity entity=new FileEntity(Paths.get("some.xml").toFile(),ContentType.APPLICATION_XML);\n postRequest.setEntity(entity);\n HttpResponse response=httpClient.execute(postRequest);\n System.out.println(IOUtils.toString(response.getEntity().getContent()));\n')),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"javascript"))),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-javascript"},'var myHeaders = new Headers();\nmyHeaders.append("Content-Type", "application/xml");\n\nvar file = "<file contents here>";\n\nvar requestOptions = {\n method: \'POST\',\n headers: myHeaders,\n body: file,\n redirect: \'follow\'\n};\n\nfetch("http://localhost:8080", requestOptions)\n .then(response => response.text())\n .then(result => console.log(result))\n .catch(error => console.log(\'error\', error));\n')))}c.isMDXComponent=!0}}]);

View file

@ -0,0 +1 @@
"use strict";(self.webpackChunkvalidator_frontend=self.webpackChunkvalidator_frontend||[]).push([[624],{6439:function(e,t,n){n.r(t),n.d(t,{assets:function(){return l},contentTitle:function(){return a},default:function(){return p},frontMatter:function(){return o},metadata:function(){return r},toc:function(){return c}});var r=JSON.parse('{"id":"api","title":"API Usage","description":"The validation service listens to POST-requests to any server uri. You need to supply the xml/object to validate in","source":"@site/docs/api.md","sourceDirName":".","slug":"/api","permalink":"/docs/api","draft":false,"unlisted":false,"editUrl":"https://github.com/itplr-kosit/validator/server/ui/docs/api.md","tags":[],"version":"current","sidebarPosition":2,"frontMatter":{"sidebar_position":2},"sidebar":"tutorialSidebar","previous":{"title":"Configurations","permalink":"/docs/configurations"},"next":{"title":"Changelog","permalink":"/docs/changelog"}}'),s=n(4848),i=n(8453);const o={sidebar_position:2},a="API Usage",l={},c=[];function d(e){const t={code:"code",h1:"h1",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"api-usage",children:"API Usage"})}),"\n",(0,s.jsxs)(t.p,{children:["The validation service listens to ",(0,s.jsx)(t.code,{children:"POST"}),"-requests to any server uri. You need to supply the xml/object to validate in\nthe post body.\nThe service expects a single plain input in the post body, e.g. ",(0,s.jsx)(t.code,{children:"multipart/form-data"})," is not supported."]}),"\n",(0,s.jsx)(t.p,{children:"Examples:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.code,{children:"cURL"})}),"\n"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-shell",metastring:"script",children:"curl --location --request POST 'http://localhost:8080' \\\n --header 'Content-Type: application/xml' \\\n --data-binary '@/target.xml'\n"})}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"Java"})," (Apache HttpClient)"]}),"\n"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-java",children:'HttpClient httpClient=HttpClientBuilder.create().build();\nHttpPost postRequest=new HttpPost("http://localhost:8080/");\nFileEntity entity=new FileEntity(Paths.get("some.xml").toFile(),ContentType.APPLICATION_XML);\npostRequest.setEntity(entity);\nHttpResponse response=httpClient.execute(postRequest);\nSystem.out.println(IOUtils.toString(response.getEntity().getContent()));\n'})}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.code,{children:"JavaScript"})}),"\n"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-javascript",children:'var myHeaders = new Headers();\nmyHeaders.append("Content-Type", "application/xml");\n\nvar file = "<file contents here>";\n\nvar requestOptions = {\n method: \'POST\',\n headers: myHeaders,\n body: file,\n redirect: \'follow\'\n};\n\nfetch("http://localhost:8080", requestOptions)\n .then(response => response.text())\n .then(result => console.log(result))\n .catch(error => console.log(\'error\', error));\n'})})]})}function p(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:function(e,t,n){n.d(t,{R:function(){return o},x:function(){return a}});var r=n(6540);const s={},i=r.createContext(s);function o(e){const t=r.useContext(i);return r.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),r.createElement(i.Provider,{value:t},e.children)}}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
"use strict";(self.webpackChunkvalidator_frontend=self.webpackChunkvalidator_frontend||[]).push([[118],{6275:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(7294),a=n(5833),i=n(7547),l=n(7506);var o=function(e){let{endpoint:t,fileName:n}=e;const{request:o,data:c,error:u,status:d}=(0,l.Z)();return(0,r.useEffect)((()=>{o(t,{headers:{"Content-Type":"application/xml"}})}),[t,o]),r.createElement(r.Fragment,null,d===l.e.Failure&&u&&r.createElement(i.Z,{title:"An error occurred while fetching"},r.createElement(a.Z,null,u.message)),d===l.e.Success&&c&&r.createElement(a.Z,{download:{fileName:n,mime:"application/xml"},enableCopy:!0},c))}},3596:function(e,t,n){n.r(t);var r=n(7294),a=n(8222),i=n(6275);t.default=function(){return r.createElement(a.Z,{title:"Validator configuration",layoutDescription:"The currently loaded validator configuration",headline:"Validator configuration",description:"View the currently loaded validator configuration."},r.createElement(i.Z,{endpoint:"/server/config",fileName:"config.xml"}))}}}]);

View file

@ -1 +0,0 @@
"use strict";(self.webpackChunkvalidator_frontend=self.webpackChunkvalidator_frontend||[]).push([[433,981],{6275:function(e,t,n){n.d(t,{Z:function(){return o}});var a=n(7294),r=n(5833),l=n(7547),i=n(7506);var o=function(e){let{endpoint:t,fileName:n}=e;const{request:o,data:u,error:c,status:s}=(0,i.Z)();return(0,a.useEffect)((()=>{o(t,{headers:{"Content-Type":"application/xml"}})}),[t,o]),a.createElement(a.Fragment,null,s===i.e.Failure&&c&&a.createElement(l.Z,{title:"An error occurred while fetching"},a.createElement(r.Z,null,c.message)),s===i.e.Success&&u&&a.createElement(r.Z,{download:{fileName:n,mime:"application/xml"},enableCopy:!0},u))}},2406:function(e,t,n){n.r(t);var a=n(7294),r=n(8222),l=n(6275);t.default=function(){return a.createElement(r.Z,{title:"Health information",layoutDescription:"Health and status information about the system",headline:"Server health information",description:"Information about health and status of the running system."},a.createElement(l.Z,{endpoint:"/server/health",fileName:"health.xml"}))}},6411:function(e,t,n){n.r(t);var a=n(2406);t.default=a.default}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
"use strict";(self.webpackChunkvalidator_frontend=self.webpackChunkvalidator_frontend||[]).push([[53],{1109:function(e){e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"Configurations","href":"/docs/configurations","docId":"configurations"},{"type":"link","label":"API Usage","href":"/docs/api","docId":"api"},{"type":"link","label":"Changelog","href":"/docs/changelog","docId":"changelog"}]},"docs":{"api":{"id":"api","title":"API Usage","description":"The validation service listens to POST-requests to any server uri. You need to supply the xml/object to validate in","sidebar":"tutorialSidebar"},"changelog":{"id":"changelog","title":"Changelog","description":"All notable changes to this project will be documented in this file.","sidebar":"tutorialSidebar"},"configurations":{"id":"configurations","title":"Configurations","description":"The validator needs a scenario configuration for working properly.","sidebar":"tutorialSidebar"}}}')}}]);

View file

@ -1 +0,0 @@
"use strict";(self.webpackChunkvalidator_frontend=self.webpackChunkvalidator_frontend||[]).push([[972],{4972:function(e,t,n){n.r(t),n.d(t,{default:function(){return i}});var a=n(7294),o=n(5999),l=n(1944),r=n(3285);function i(){return a.createElement(a.Fragment,null,a.createElement(l.d,{title:(0,o.I)({id:"theme.NotFound.title",message:"Page Not Found"})}),a.createElement(r.Z,null,a.createElement("main",{className:"container margin-vert--xl"},a.createElement("div",{className:"row"},a.createElement("div",{className:"col col--6 col--offset-3"},a.createElement("h1",{className:"hero__title"},a.createElement(o.Z,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),a.createElement("p",null,a.createElement(o.Z,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for.")),a.createElement("p",null,a.createElement(o.Z,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))))}}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
"use strict";(self.webpackChunkvalidator_frontend=self.webpackChunkvalidator_frontend||[]).push([[870],{5745:function(e){e.exports=JSON.parse('{"name":"docusaurus-plugin-content-pages","id":"default"}')}}]); "use strict";(self.webpackChunkvalidator_frontend=self.webpackChunkvalidator_frontend||[]).push([[235],{8552:function(e){e.exports=JSON.parse('{"name":"docusaurus-plugin-content-pages","id":"default"}')}}]);

View file

@ -0,0 +1 @@
"use strict";(self.webpackChunkvalidator_frontend=self.webpackChunkvalidator_frontend||[]).push([[98],{1723:function(n,e,r){r.r(e),r.d(e,{default:function(){return l}});r(6540);var s=r(5500);function o(n,e){return`docs-${n}-${e}`}var t=r(3025),i=r(2831),c=r(1463),u=r(4848);function a(n){const{version:e}=n;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(c.A,{version:e.version,tag:o(e.pluginId,e.version)}),(0,u.jsx)(s.be,{children:e.noIndex&&(0,u.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})]})}function d(n){const{version:e,route:r}=n;return(0,u.jsx)(s.e3,{className:e.className,children:(0,u.jsx)(t.n,{version:e,children:(0,i.v)(r.routes)})})}function l(n){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(a,{...n}),(0,u.jsx)(d,{...n})]})}}}]);

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
"use strict";(self.webpackChunkvalidator_frontend=self.webpackChunkvalidator_frontend||[]).push([[983],{3769:function(e){e.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]); "use strict";(self.webpackChunkvalidator_frontend=self.webpackChunkvalidator_frontend||[]).push([[742],{7093:function(e){e.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
"use strict";(self.webpackChunkvalidator_frontend=self.webpackChunkvalidator_frontend||[]).push([[981],{6275:function(e,t,n){n.d(t,{Z:function(){return o}});var a=n(7294),r=n(5833),l=n(7547),i=n(7506);var o=function(e){let{endpoint:t,fileName:n}=e;const{request:o,data:u,error:s,status:c}=(0,i.Z)();return(0,a.useEffect)((()=>{o(t,{headers:{"Content-Type":"application/xml"}})}),[t,o]),a.createElement(a.Fragment,null,c===i.e.Failure&&s&&a.createElement(l.Z,{title:"An error occurred while fetching"},a.createElement(r.Z,null,s.message)),c===i.e.Success&&u&&a.createElement(r.Z,{download:{fileName:n,mime:"application/xml"},enableCopy:!0},u))}},2406:function(e,t,n){n.r(t);var a=n(7294),r=n(8222),l=n(6275);t.default=function(){return a.createElement(r.Z,{title:"Health information",layoutDescription:"Health and status information about the system",headline:"Server health information",description:"Information about health and status of the running system."},a.createElement(l.Z,{endpoint:"/server/health",fileName:"health.xml"}))}}}]);

View file

@ -1 +0,0 @@
"use strict";(self.webpackChunkvalidator_frontend=self.webpackChunkvalidator_frontend||[]).push([[962,118],{6275:function(e,t,n){n.d(t,{Z:function(){return o}});var a=n(7294),r=n(5833),i=n(7547),l=n(7506);var o=function(e){let{endpoint:t,fileName:n}=e;const{request:o,data:c,error:u,status:d}=(0,l.Z)();return(0,a.useEffect)((()=>{o(t,{headers:{"Content-Type":"application/xml"}})}),[t,o]),a.createElement(a.Fragment,null,d===l.e.Failure&&u&&a.createElement(i.Z,{title:"An error occurred while fetching"},a.createElement(r.Z,null,u.message)),d===l.e.Success&&c&&a.createElement(r.Z,{download:{fileName:n,mime:"application/xml"},enableCopy:!0},c))}},3596:function(e,t,n){n.r(t);var a=n(7294),r=n(8222),i=n(6275);t.default=function(){return a.createElement(r.Z,{title:"Validator configuration",layoutDescription:"The currently loaded validator configuration",headline:"Validator configuration",description:"View the currently loaded validator configuration."},a.createElement(i.Z,{endpoint:"/server/config",fileName:"config.xml"}))}},2536:function(e,t,n){n.r(t);var a=n(3596);t.default=a.default}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,53 +0,0 @@
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
* @license MIT */
/**
* Prism: Lightweight, robust, elegant syntax highlighting
*
* @license MIT <https://opensource.org/licenses/MIT>
* @author Lea Verou <https://lea.verou.me>
* @namespace
* @public
*/
/** @license React v0.20.2
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.2
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.2
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,61 @@
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
* @license MIT */
/**
* @license React
* react-dom-client.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* react-dom.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* react.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* scheduler.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

View file

@ -1 +0,0 @@
!function(){"use strict";var e,t,n,r,o,f={},u={};function i(e){var t=u[e];if(void 0!==t)return t.exports;var n=u[e]={id:e,loaded:!1,exports:{}};return f[e].call(n.exports,n,n.exports,i),n.loaded=!0,n.exports}i.m=f,i.c=u,e=[],i.O=function(t,n,r,o){if(!n){var f=1/0;for(d=0;d<e.length;d++){n=e[d][0],r=e[d][1],o=e[d][2];for(var u=!0,c=0;c<n.length;c++)(!1&o||f>=o)&&Object.keys(i.O).every((function(e){return i.O[e](n[c])}))?n.splice(c--,1):(u=!1,o<f&&(f=o));if(u){e.splice(d--,1);var a=r();void 0!==a&&(t=a)}}return t}o=o||0;for(var d=e.length;d>0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[n,r,o]},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},i.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);i.r(o);var f={};t=t||[null,n({}),n([]),n(n)];for(var u=2&r&&e;"object"==typeof u&&!~t.indexOf(u);u=n(u))Object.getOwnPropertyNames(u).forEach((function(t){f[t]=function(){return e[t]}}));return f.default=function(){return e},i.d(o,f),o},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=function(e){return Promise.all(Object.keys(i.f).reduce((function(t,n){return i.f[n](e,t),t}),[]))},i.u=function(e){return"assets/js/"+({53:"935f2afb",80:"9beb87c2",85:"1f391b9e",118:"779c529c",207:"5fbc5cf1",237:"1df93b7f",414:"393be207",433:"798a5b56",514:"1be78505",592:"common",870:"f9512c76",910:"5d7f3e2f",918:"17896441",962:"eae68ef6",981:"e44a8e24",983:"01614a01"}[e]||e)+"."+{53:"66d1c40f",80:"1cc504cf",85:"ff7b907c",118:"e6f903f8",207:"6eb09db1",237:"c492b5ad",414:"36f5a793",433:"5978ee14",514:"6890df1b",523:"3ef240ab",592:"f13082de",601:"da3afc33",870:"5069c08d",910:"89ac2b20",918:"ee21715a",962:"43fba47a",972:"acd6d62f",981:"a5958152",983:"9bc90821"}[e]+".js"},i.miniCssF=function(e){},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="validator-frontend:",i.l=function(e,t,n,f){if(r[e])r[e].push(t);else{var u,c;if(void 0!==n)for(var a=document.getElementsByTagName("script"),d=0;d<a.length;d++){var l=a[d];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==o+n){u=l;break}}u||(c=!0,(u=document.createElement("script")).charset="utf-8",u.timeout=120,i.nc&&u.setAttribute("nonce",i.nc),u.setAttribute("data-webpack",o+n),u.src=e),r[e]=[t];var b=function(t,n){u.onerror=u.onload=null,clearTimeout(s);var o=r[e];if(delete r[e],u.parentNode&&u.parentNode.removeChild(u),o&&o.forEach((function(e){return e(n)})),t)return t(n)},s=setTimeout(b.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=b.bind(null,u.onerror),u.onload=b.bind(null,u.onload),c&&document.head.appendChild(u)}},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.p="/",i.gca=function(e){return e={17896441:"918","935f2afb":"53","9beb87c2":"80","1f391b9e":"85","779c529c":"118","5fbc5cf1":"207","1df93b7f":"237","393be207":"414","798a5b56":"433","1be78505":"514",common:"592",f9512c76:"870","5d7f3e2f":"910",eae68ef6:"962",e44a8e24:"981","01614a01":"983"}[e]||e,i.p+i.u(e)},function(){var e={303:0,532:0};i.f.j=function(t,n){var r=i.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var o=new Promise((function(n,o){r=e[t]=[n,o]}));n.push(r[2]=o);var f=i.p+i.u(t),u=new Error;i.l(f,(function(n){if(i.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),f=n&&n.target&&n.target.src;u.message="Loading chunk "+t+" failed.\n("+o+": "+f+")",u.name="ChunkLoadError",u.type=o,u.request=f,r[1](u)}}),"chunk-"+t,t)}},i.O.j=function(t){return 0===e[t]};var t=function(t,n){var r,o,f=n[0],u=n[1],c=n[2],a=0;if(f.some((function(t){return 0!==e[t]}))){for(r in u)i.o(u,r)&&(i.m[r]=u[r]);if(c)var d=c(i)}for(t&&t(n);a<f.length;a++)o=f[a],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return i.O(d)},n=self.webpackChunkvalidator_frontend=self.webpackChunkvalidator_frontend||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}()}();

View file

@ -0,0 +1 @@
!function(){"use strict";var e,t,n,r,o,a={},f={};function u(e){var t=f[e];if(void 0!==t)return t.exports;var n=f[e]={id:e,loaded:!1,exports:{}};return a[e].call(n.exports,n,n.exports,u),n.loaded=!0,n.exports}u.m=a,u.c=f,e=[],u.O=function(t,n,r,o){if(!n){var a=1/0;for(d=0;d<e.length;d++){n=e[d][0],r=e[d][1],o=e[d][2];for(var f=!0,i=0;i<n.length;i++)(!1&o||a>=o)&&Object.keys(u.O).every(function(e){return u.O[e](n[i])})?n.splice(i--,1):(f=!1,o<a&&(a=o));if(f){e.splice(d--,1);var c=r();void 0!==c&&(t=c)}}return t}o=o||0;for(var d=e.length;d>0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[n,r,o]},u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},u.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);u.r(o);var a={};t=t||[null,n({}),n([]),n(n)];for(var f=2&r&&e;("object"==typeof f||"function"==typeof f)&&!~t.indexOf(f);f=n(f))Object.getOwnPropertyNames(f).forEach(function(t){a[t]=function(){return e[t]}});return a.default=function(){return e},u.d(o,a),o},u.d=function(e,t){for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.f={},u.e=function(e){return Promise.all(Object.keys(u.f).reduce(function(t,n){return u.f[n](e,t),t},[]))},u.u=function(e){return"assets/js/"+({48:"a94703ab",54:"798a5b56",61:"1f391b9e",98:"a7bd4aaa",134:"393be207",235:"a7456010",329:"eae68ef6",401:"17896441",484:"779c529c",539:"9beb87c2",583:"1df93b7f",611:"5d7f3e2f",624:"5fbc5cf1",647:"5e95c892",686:"e44a8e24",742:"aba21aa0",849:"0058b4c6"}[e]||e)+"."+{48:"e49f952b",54:"d9c9916a",61:"69340b3f",98:"12e04b2e",134:"7d08b896",235:"940b5a7c",237:"74e7c364",329:"70a85054",401:"39e0f7bf",484:"bfcecd46",539:"406b76e0",583:"cab9d34e",611:"1e629fd2",624:"dcf3c1f0",647:"c67ce0cb",668:"943726c2",686:"8be6cee2",742:"a3ff5d55",849:"d56c7534",879:"c6b41a68"}[e]+".js"},u.miniCssF=function(e){},u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="validator-frontend:",u.l=function(e,t,n,a){if(r[e])r[e].push(t);else{var f,i;if(void 0!==n)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var l=c[d];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==o+n){f=l;break}}f||(i=!0,(f=document.createElement("script")).charset="utf-8",f.timeout=120,u.nc&&f.setAttribute("nonce",u.nc),f.setAttribute("data-webpack",o+n),f.src=e),r[e]=[t];var b=function(t,n){f.onerror=f.onload=null,clearTimeout(s);var o=r[e];if(delete r[e],f.parentNode&&f.parentNode.removeChild(f),o&&o.forEach(function(e){return e(n)}),t)return t(n)},s=setTimeout(b.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=b.bind(null,f.onerror),f.onload=b.bind(null,f.onload),i&&document.head.appendChild(f)}},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.p="/",u.gca=function(e){return e={17896441:"401",a94703ab:"48","798a5b56":"54","1f391b9e":"61",a7bd4aaa:"98","393be207":"134",a7456010:"235",eae68ef6:"329","779c529c":"484","9beb87c2":"539","1df93b7f":"583","5d7f3e2f":"611","5fbc5cf1":"624","5e95c892":"647",e44a8e24:"686",aba21aa0:"742","0058b4c6":"849"}[e]||e,u.p+u.u(e)},function(){var e={354:0,869:0};u.f.j=function(t,n){var r=u.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else if(/^(354|869)$/.test(t))e[t]=0;else{var o=new Promise(function(n,o){r=e[t]=[n,o]});n.push(r[2]=o);var a=u.p+u.u(t),f=new Error;u.l(a,function(n){if(u.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;f.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",f.name="ChunkLoadError",f.type=o,f.request=a,r[1](f)}},"chunk-"+t,t)}},u.O.j=function(t){return 0===e[t]};var t=function(t,n){var r,o,a=n[0],f=n[1],i=n[2],c=0;if(a.some(function(t){return 0!==e[t]})){for(r in f)u.o(f,r)&&(u.m[r]=f[r]);if(i)var d=i(u)}for(t&&t(n);c<a.length;c++)o=a[c],u.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return u.O(d)},n=self.webpackChunkvalidator_frontend=self.webpackChunkvalidator_frontend||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}()}();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show more