#21 Umsetzung der API Rückgabe, erste version

This commit is contained in:
Andreas Penski (init) 2019-05-17 11:21:22 +02:00 committed by Andreas Penski
parent a424fbbcfe
commit ab31ed71b1
21 changed files with 532 additions and 147 deletions

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<foo xmlns="http://validator.kosit.de/test-sample">
<inner>asldkfj</inner>
</foo>

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<simple xmlns="http://validator.kosit.de/test-sample">
<inner>asldkfj</inner>
<notAllowed />
</simple>

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<simple xmlns="http://validator.kosit.de/test-sample">
<inner>asldkfj</inner>
</simple>

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<existiertNicht xmlns="http://validator.kosit.de/unbekannt">
<inner>asldkfj</inner>
</existiertNicht>

View file

@ -0,0 +1,44 @@
<?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.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:in="http://www.xoev.de/de/validator/framework/1/createreportinput"
exclude-result-prefixes="xs"
version="2.0">
<xsl:output method="xml" indent="yes" />
<xsl:param name="input-document" as="document-node(element())" required="yes" />
<xsl:template match="in:createReportInput">
<report xmlns="http://validator.kosit.de/test-report">
<input>
<xsl:copy-of select="$input-document" />
</input>
<result>
<xsl:copy-of select="." />
</result>
</report>
</xsl:template>
</xsl:stylesheet>

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://validator.kosit.de/test-sample" version="1.0" xml:lang="en"
targetNamespace="http://validator.kosit.de/test-sample"
xmlns="http://www.w3.org/1999/xhtml" elementFormDefault="qualified">
<xs:element name="simple" type="tns:SimpleType" />
<xs:element name="foo" type="tns:SimpleType" />
<xs:complexType name="SimpleType">
<xs:sequence>
<xs:element name="inner" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:schema>

View file

@ -0,0 +1,84 @@
<?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.
-->
<scenarios xmlns="http://www.xoev.de/de/validator/framework/1/scenarios" frameworkVersion="1.1.2">
<name>HTML-TestSuite</name>
<date>2017-08-08</date>
<description>
<p>Szenario für Tests</p>
</description>
<scenario>
<name>Simple</name>
<description>
<p>Nur Schemaprüfung.</p>
</description>
<namespace prefix="cri">http://www.xoev.de/de/validator/framework/1/createreportinput</namespace>
<namespace prefix="test">http://validator.kosit.de/test-sample</namespace>
<namespace prefix="rpt">http://validator.kosit.de/test-report</namespace>
<match>/test:simple</match>
<validateWithXmlSchema>
<resource>
<name>Sample Schema</name>
<location>simple.xsd</location>
</resource>
</validateWithXmlSchema>
<createReport>
<resource>
<name>Report für eRechnung</name>
<location>report.xsl</location>
</resource>
</createReport>
<acceptMatch>count(//cri:xmlSyntaxError) = 0</acceptMatch>
</scenario>
<scenario>
<name>NoAcceptMatch</name>
<description>
<p>Nur Schemaprüfung. Keine AcceptMatch deklaration</p>
<p>Testen, ob auch alte Konfiguration funktionioeren</p>
</description>
<namespace prefix="test">http://validator.kosit.de/test-sample</namespace>
<match>/test:foo</match>
<validateWithXmlSchema>
<resource>
<name>Sample Schema</name>
<location>simple.xsd</location>
</resource>
</validateWithXmlSchema>
<createReport>
<resource>
<name>Report für eRechnung</name>
<location>report.xsl</location>
</resource>
</createReport>
</scenario>
<noScenarioReport>
<resource>
<name>default</name>
<location>report.xsl</location>
</resource>
</noScenarioReport>
</scenarios>