Moved validation tool one level up, as it is now the sole content of this repository

This commit is contained in:
fbuettner 2018-03-06 09:27:56 +01:00
parent 7383efd257
commit 9ad51731ab
97 changed files with 260 additions and 315 deletions

View file

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Koordinierungsstelle für IT-Standards (KoSIT) under
~ one or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. KoSIT licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<!-- $Id: assertions.xsd 7554 2017-09-13 14:27:21Z fbuettner $ -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:a="http://www.xoev.de/de/validator/framework/1/assertions"
targetNamespace="http://www.xoev.de/de/validator/framework/1/assertions" version="1.0.0"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:element name="assertions">
<xs:annotation>
<xs:documentation>In diesem Dokument werden zum Test einer Prüftoolkonfiguration Zusicherungen zu einzelnen
Prüfberichten beschrieben. Ein
solches Dokument kann der Kommandozeilenversion des Prüftools über --check-assertions übergeben werden.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="namespace" type="a:NamespaceType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="assertion" type="a:AssertionType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="NamespaceType">
<xs:annotation>
<xs:documentation>Definition eines Präfix für einen Namensraum, zur Verwendung in nachfolgenden
assertion-Elementen.
</xs:documentation>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="xs:anyURI">
<xs:attribute name="prefix" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="AssertionType">
<xs:annotation>
<xs:documentation>Zusicherung: für das in report-doc angegebene Dokument (relativ zum aktuellen
Ausgabeverzeichnis) hat der angebene
XPath-Test den "Effective Truth Value" true(). Im Textknoten kann eine textuelle Zusammenfassung des
Tests stehen.
</xs:documentation>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="xs:token">
<xs:attribute name="report-doc" type="xs:anyURI" use="required"/>
<xs:attribute name="test" type="xs:string" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:schema>

View file

@ -0,0 +1,153 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Koordinierungsstelle für IT-Standards (KoSIT) under
~ one or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. KoSIT licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<!-- $Id$ -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:in="http://www.xoev.de/de/validator/framework/1/createreportinput"
xmlns:s="http://www.xoev.de/de/validator/framework/1/scenarios" targetNamespace="http://www.xoev.de/de/validator/framework/1/createreportinput" version="1.0.0"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:import namespace="http://www.xoev.de/de/validator/framework/1/scenarios" schemaLocation="scenarios.xsd"/>
<xs:element name="createReportInput">
<xs:complexType>
<xs:sequence>
<xs:element name="engine" type="in:EngineType"/>
<xs:element name="timestamp" type="xs:dateTime"/>
<xs:element name="documentIdentification" type="in:DocumentIdentificationType"/>
<xs:element ref="s:scenario" minOccurs="0"/>
<xs:element name="validationResultsWellformedness" type="in:ValidationResultsWellformedness" minOccurs="0"/>
<xs:element name="validationResultsXmlSchema" type="in:ValidationResultsXmlSchema" minOccurs="0"/>
<xs:element name="validationResultsSchematron" type="in:ValidationResultsSchematron" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="processingError" type="in:ProcessingError" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="frameworkVersion" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
<xs:complexType name="Document">
<xs:sequence>
<xs:any processContents="skip" namespace="##any"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ValidationResultsWellformedness">
<xs:sequence>
<xs:element name="xmlSyntaxError" type="in:XMLSyntaxError" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ValidationResultsXmlSchema">
<xs:sequence>
<xs:element ref="s:resource" maxOccurs="unbounded"/>
<xs:element name="xmlSyntaxError" type="in:XMLSyntaxError" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:annotation>
<xs:documentation>In alignment with
http://docs.oracle.com/javase/8/docs/api/org/xml/sax/ErrorHandler.html and
http://docs.oracle.com/javase/8/docs/api/org/xml/sax/SAXParseException.html</xs:documentation>
</xs:annotation>
<xs:complexType name="XMLSyntaxError">
<xs:sequence>
<xs:element name="message" type="xs:normalizedString"/>
<xs:element name="severity" type="in:XMLSyntaxErrorSeverity"/>
<xs:element name="rowNumber" type="xs:int" minOccurs="0"/>
<xs:element name="columnNumber" type="xs:int" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="XMLSyntaxErrorSeverity">
<xs:restriction base="xs:token">
<xs:enumeration value="SEVERITY_WARNING"/>
<xs:enumeration value="SEVERITY_ERROR"/>
<xs:enumeration value="SEVERITY_FATAL_ERROR"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="ValidationResultsSchematron">
<xs:sequence>
<xs:element ref="s:resource"/>
<xs:element name="results">
<xs:complexType>
<xs:sequence>
<xs:any namespace="##any" processContents="skip"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DocumentIdentificationType">
<xs:annotation>
<xs:documentation>Dient der eindeutigen Identifikation des geprüften Dokuments anhand seines Hashwertes, der durch eine Dokumentenreferenz
ergänzt werden kann.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="documentHash">
<xs:annotation>
<xs:documentation>Angaben zum Hashwert des geprüften Dokuments.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="hashAlgorithm" type="xs:normalizedString">
<xs:annotation>
<xs:documentation>Benennung eines Algorithmus zur Berechnung des Hashwerts.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="hashValue" type="xs:base64Binary">
<xs:annotation>
<xs:documentation>Der Hashwert des geprüften Dokuments bei Anwendung des bezeichneten Algorithmus.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="documentReference" type="xs:normalizedString">
<xs:annotation>
<xs:documentation>Eine von der prüfenden Organisationseinheit festgelegte, möglichst eindeutige Referenz des geprüften
Dokuments.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="EngineType">
<xs:sequence>
<xs:element name="name" type="xs:normalizedString"/>
<xs:element name="info" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:normalizedString">
<xs:attribute name="key" type="xs:NMTOKEN" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ProcessingError">
<xs:sequence>
<xs:element name="error" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:schema>

View file

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Koordinierungsstelle für IT-Standards (KoSIT) under
~ one or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. KoSIT licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<!-- $Id$ -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:s="http://www.xoev.de/de/validator/framework/1/scenarios"
targetNamespace="http://www.xoev.de/de/validator/framework/1/scenarios" version="1.0.0" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="scenarios">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:token"/>
<xs:element minOccurs="0" name="author" type="xs:token"/>
<xs:element name="date" type="xs:date"/>
<xs:element name="description" type="s:DescriptionType"/>
<xs:element ref="s:scenario" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="noScenarioReport" type="s:NoScenarioReportType"/>
</xs:sequence>
<xs:attribute name="frameworkVersion" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="scenario" type="s:ScenarioType"/>
<xs:complexType name="NoScenarioReportType">
<xs:sequence>
<xs:element ref="s:resource"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DescriptionType">
<xs:choice maxOccurs="unbounded">
<xs:element name="p" type="xs:normalizedString"/>
<xs:element name="ol">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="li" type="xs:normalizedString"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ul">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="li" type="xs:normalizedString"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<!-- TODO: Prüfen, ob restriction passt -->
<xs:simpleType name="ErrorLevelType">
<xs:restriction base="xs:token">
<xs:enumeration value="error"/>
<xs:enumeration value="warning"/>
<xs:enumeration value="information"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Tokens">
<xs:list itemType="xs:token"/>
</xs:simpleType>
<xs:complexType name="ScenarioType">
<xs:sequence>
<xs:element name="name" type="xs:token"/>
<xs:element minOccurs="0" name="description" type="s:DescriptionType"/>
<xs:element minOccurs="0" maxOccurs="unbounded" name="namespace" type="s:NamespaceType"/>
<xs:element name="match" type="xs:string"/>
<xs:element name="validateWithXmlSchema" type="s:ValidateWithXmlSchema"/>
<xs:element name="validateWithSchematron" maxOccurs="unbounded" minOccurs="0" type="s:ValidateWithSchematron"/>
<xs:element name="createReport" type="s:CreateReportType"/>
</xs:sequence>
</xs:complexType>
<xs:element name="resource" type="s:ResourceType"/>
<xs:complexType name="NamespaceType">
<xs:simpleContent>
<xs:extension base="xs:anyURI">
<xs:attribute name="prefix" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="ResourceType">
<xs:sequence>
<xs:element name="name" type="xs:token"/>
<xs:element name="location" type="xs:anyURI"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ValidateWithXmlSchema">
<xs:sequence>
<xs:element ref="s:resource" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ValidateWithSchematron">
<xs:sequence>
<xs:element ref="s:resource"/>
</xs:sequence>
<xs:attribute name="psvi" type="xs:boolean" default="false" use="optional"/>
</xs:complexType>
<xs:complexType name="CreateReportType">
<xs:sequence>
<xs:element ref="s:resource"/>
<xs:element maxOccurs="3" minOccurs="0" name="customLevel" type="s:CustomErrorLevel"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CustomErrorLevel">
<xs:simpleContent>
<xs:extension base="s:Tokens">
<xs:attribute name="level" type="s:ErrorLevelType" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:schema>