mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-25 16:55:39 +00:00
Merge branch 'daemon' into 'master'
#10 Daemon Mode umsetzen See merge request kosit/validator!3
This commit is contained in:
commit
248f460500
35 changed files with 17482 additions and 25 deletions
|
|
@ -131,7 +131,7 @@ CheckConfiguration config = new CheckConfiguration();
|
|||
config.setScenarioDefinition(scenarios);
|
||||
|
||||
//Instanziierung der DefaultCheck-Implementierung
|
||||
Check check = new DefaultCheck(config);
|
||||
Check implemenation = new DefaultCheck(config);
|
||||
```
|
||||
|
||||
Weitere Konfigurationsoption ist der Pfad zum Repository. Standardmäßig wird das Repository relativ zur Szenarien-Defintion
|
||||
|
|
@ -148,12 +148,12 @@ Check pruefer = new DefaultCheck(config);
|
|||
|
||||
//einzelne Datei prüfen
|
||||
Input pruefKandidat = InputFactory.read(new File("rechnung.xml"));
|
||||
Document report = pruefer.check(pruefKandidat);
|
||||
Document report = pruefer.implemenation(pruefKandidat);
|
||||
|
||||
//Batch-Prüfung
|
||||
List<File> files = Files.list(Paths.get("rechnungen")).map(path -> path.toFile()).collect(Collectors.toList());
|
||||
List<Input> toCheck = files.stream().map(InputFactory::read).collect(Collectors.toList());
|
||||
List<Document> reports = pruefer.check(toCheck);
|
||||
List<Document> reports = pruefer.implemenation(toCheck);
|
||||
|
||||
```
|
||||
|
||||
|
|
@ -284,7 +284,7 @@ verwiesen.
|
|||
insgesamt 310 prüfbaren Aussagen (Assertions) über die resultierenden Prüfberichte erstellt.
|
||||
* Durch diese Testsuite werden, ausgehend von dem Prüfbericht-Schemas alle möglichen Optionen und Auswahlmöglichkeiten
|
||||
mindestens je einmal positiv und einmal negativ getestet.
|
||||
* Diese Zusicherungen können vom Prüftool selbst mittels des Schalter `--check-assertions` automatisch geprüft werden.
|
||||
* Diese Zusicherungen können vom Prüftool selbst mittels des Schalter `--implemenation-assertions` automatisch geprüft werden.
|
||||
* Zudem wird die Integrität aller erstellten Prüfberichte automatisch gegen das Schema (XML Schema und
|
||||
Schematron-Regeln) des Prüfberichts getestet.
|
||||
* Für weitere Details siehe [xrechnung/test/readme.txt](configurations/xrechnung/test/readme.txt).
|
||||
|
|
|
|||
93
pom.xml
93
pom.xml
|
|
@ -18,7 +18,8 @@
|
|||
~ under the License.
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<prerequisites>
|
||||
<maven>3.0</maven>
|
||||
|
|
@ -26,7 +27,7 @@
|
|||
|
||||
<name>KoSIT XML Prüftool Implementierung</name>
|
||||
|
||||
<groupId>de.kosit</groupId>
|
||||
<groupId>de.kosit</groupId>
|
||||
<version>1.1.0-SNAPSHOT</version>
|
||||
|
||||
<artifactId>validationtool</artifactId>
|
||||
|
|
@ -51,6 +52,7 @@
|
|||
<version.lombok>1.16.16</version.lombok>
|
||||
<version.saxon-he>9.9.1-1</version.saxon-he>
|
||||
<version.slf4j>1.7.25</version.slf4j>
|
||||
<docker.host>localhost</docker.host>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
|
@ -107,6 +109,12 @@
|
|||
<version>1.3.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.rest-assured</groupId>
|
||||
<artifactId>rest-assured</artifactId>
|
||||
<version>3.3.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
|
@ -128,6 +136,7 @@
|
|||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.3.1</version>
|
||||
|
|
@ -215,6 +224,86 @@
|
|||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>0.28.0</version>
|
||||
<configuration>
|
||||
<dockerHost>tcp://localhost:2375</dockerHost>
|
||||
<showLogs>true</showLogs>
|
||||
<startParallel>true</startParallel>
|
||||
<verbose>false</verbose>
|
||||
<images>
|
||||
<image>
|
||||
<alias>daemon</alias>
|
||||
<name>daemon</name>
|
||||
<build>
|
||||
<dockerFileDir>daemon</dockerFileDir>
|
||||
<assembly>
|
||||
<inline>
|
||||
<files>
|
||||
<file>
|
||||
<source>${project.build.directory}/validationtool-${project.version}-standalone.jar</source>
|
||||
<destName>validationtool-standalone.jar</destName>
|
||||
</file>
|
||||
</files>
|
||||
</inline>
|
||||
</assembly>
|
||||
</build>
|
||||
<run>
|
||||
<network>
|
||||
<mode>bridge</mode>
|
||||
</network>
|
||||
<ports>
|
||||
<port>8080:8080</port>
|
||||
</ports>
|
||||
<wait>
|
||||
<time>5000</time>
|
||||
</wait>
|
||||
</run>
|
||||
</image>
|
||||
</images>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>up</id>
|
||||
<phase>pre-integration-test</phase>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
<goal>start</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>post</id>
|
||||
<phase>post-integration-test</phase>
|
||||
<goals>
|
||||
<goal>stop</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- Failsafe Plugin to run integration tests -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<version>2.22.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>integration-test</goal>
|
||||
<goal>verify</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<!--suppress MavenModelInspection -->
|
||||
<argLine>
|
||||
-Ddaemon.port=8080
|
||||
-Ddaemon.host=http://localhost/
|
||||
</argLine>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<!-- Integrate the /src/main/generated folder -->
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
|
|
|
|||
8
src/main/docker/daemon/Dockerfile
Normal file
8
src/main/docker/daemon/Dockerfile
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
FROM openjdk:8
|
||||
|
||||
RUN mkdir /opt/validationtool
|
||||
ADD maven/validationtool-standalone.jar /opt/validationtool
|
||||
ADD run.sh /opt/validationtool/
|
||||
ADD config/ /opt/validationtool/
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["bash", "/opt/validationtool/run.sh" ]
|
||||
|
|
@ -0,0 +1,769 @@
|
|||
<?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.
|
||||
-->
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- ===== CCTS Core Component Type Schema Module ===== -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<xsd:schema xmlns:ccts="urn:un:unece:uncefact:documentation:2"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModule:2"
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified">
|
||||
<!-- ===== Type Definitions ===== -->
|
||||
<!-- =================================================================== -->
|
||||
<!-- ===== CCT: AmountType ===== -->
|
||||
<!-- =================================================================== -->
|
||||
<xsd:complexType name="AmountType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000001</ccts:UniqueID>
|
||||
<ccts:CategoryCode>CCT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Amount. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>A number of monetary units specified in a currency where the unit of the currency is
|
||||
explicit or implied.
|
||||
</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Amount</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>decimal</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:decimal">
|
||||
<xsd:attribute name="currencyID" type="xsd:normalizedString" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000001-SC2</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Amount Currency. Identifier</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The currency of the amount.</ccts:Definition>
|
||||
<ccts:ObjectClass>Amount Currency</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Identification</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Identifier</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
<ccts:UsageRule>Reference UNECE Rec 9, using 3-letter alphabetic codes.</ccts:UsageRule>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="currencyCodeListVersionID" type="xsd:normalizedString" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000001-SC3</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Amount Currency. Code List Version. Identifier
|
||||
</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The VersionID of the UN/ECE Rec9 code list.</ccts:Definition>
|
||||
<ccts:ObjectClass>Amount Currency</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Code List Version</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Identifier</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<!-- ===== CCT: BinaryObjectType ===== -->
|
||||
<!-- =================================================================== -->
|
||||
<xsd:complexType name="BinaryObjectType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000002</ccts:UniqueID>
|
||||
<ccts:CategoryCode>CCT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Binary Object. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>A set of finite-length sequences of binary octets.</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Binary Object</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>binary</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:base64Binary">
|
||||
<xsd:attribute name="format" type="xsd:string" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000002-SC2</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Binary Object. Format. Text</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The format of the binary content.</ccts:Definition>
|
||||
<ccts:ObjectClass>Binary Object</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Format</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Text</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="mimeCode" type="xsd:normalizedString" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000002-SC3</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Binary Object. Mime. Code</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The mime type of the binary object.</ccts:Definition>
|
||||
<ccts:ObjectClass>Binary Object</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Mime</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Code</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="encodingCode" type="xsd:normalizedString" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000002-SC4</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Binary Object. Encoding. Code</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>Specifies the decoding algorithm of the binary object.</ccts:Definition>
|
||||
<ccts:ObjectClass>Binary Object</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Encoding</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Code</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="characterSetCode" type="xsd:normalizedString" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000002-SC5</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Binary Object. Character Set. Code</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The character set of the binary object if the mime type is text.
|
||||
</ccts:Definition>
|
||||
<ccts:ObjectClass>Binary Object</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Character Set</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Code</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="uri" type="xsd:anyURI" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000002-SC6</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Binary Object. Uniform Resource. Identifier
|
||||
</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The Uniform Resource Identifier that identifies where the binary object is
|
||||
located.
|
||||
</ccts:Definition>
|
||||
<ccts:ObjectClass>Binary Object</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Uniform Resource Identifier</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Identifier</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="filename" type="xsd:string" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000002-SC7</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Binary Object. Filename.Text</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The filename of the binary object.</ccts:Definition>
|
||||
<ccts:ObjectClass>Binary Object</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Filename</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Text</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<!-- ===== CCT: CodeType ===== -->
|
||||
<!-- =================================================================== -->
|
||||
<xsd:complexType name="CodeType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000007</ccts:UniqueID>
|
||||
<ccts:CategoryCode>CCT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Code. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>A character string (letters, figures, or symbols) that for brevity and/or languange
|
||||
independence may be used to represent or replace a definitive value or text of an attribute together
|
||||
with relevant supplementary information.
|
||||
</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Code</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
<ccts:UsageRule>Should not be used if the character string identifies an instance of an object class or
|
||||
an object in the real world, in which case the Identifier. Type should be used.
|
||||
</ccts:UsageRule>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:normalizedString">
|
||||
<xsd:attribute name="listID" type="xsd:normalizedString" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000007-SC2</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Code List. Identifier</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The identification of a list of codes.</ccts:Definition>
|
||||
<ccts:ObjectClass>Code List</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Identification</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Identifier</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="listAgencyID" type="xsd:normalizedString" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000007-SC3</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Code List. Agency. Identifier</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>An agency that maintains one or more lists of codes.</ccts:Definition>
|
||||
<ccts:ObjectClass>Code List</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Agency</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Identifier</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
<ccts:UsageRule>Defaults to the UN/EDIFACT data element 3055 code list.</ccts:UsageRule>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="listAgencyName" type="xsd:string" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000007-SC4</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Code List. Agency Name. Text</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The name of the agency that maintains the list of codes.</ccts:Definition>
|
||||
<ccts:ObjectClass>Code List</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Agency Name</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Text</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="listName" type="xsd:string" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000007-SC5</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Code List. Name. Text</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The name of a list of codes.</ccts:Definition>
|
||||
<ccts:ObjectClass>Code List</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Name</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Text</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="listVersionID" type="xsd:normalizedString" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000007-SC6</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Code List. Version. Identifier</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The version of the list of codes.</ccts:Definition>
|
||||
<ccts:ObjectClass>Code List</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Version</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Identifier</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="name" type="xsd:string" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000007-SC7</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Code. Name. Text</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The textual equivalent of the code content component.</ccts:Definition>
|
||||
<ccts:ObjectClass>Code</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Name</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Text</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="languageID" type="xsd:language" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000007-SC8</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Language. Identifier</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The identifier of the language used in the code name.</ccts:Definition>
|
||||
<ccts:ObjectClass>Language</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Identification</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Identifier</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="listURI" type="xsd:anyURI" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000007-SC9</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Code List. Uniform Resource. Identifier</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The Uniform Resource Identifier that identifies where the code list is
|
||||
located.
|
||||
</ccts:Definition>
|
||||
<ccts:ObjectClass>Code List</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Uniform Resource Identifier</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Identifier</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="listSchemeURI" type="xsd:anyURI" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000007-SC10</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Code List Scheme. Uniform Resource. Identifier
|
||||
</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The Uniform Resource Identifier that identifies where the code list scheme
|
||||
is located.
|
||||
</ccts:Definition>
|
||||
<ccts:ObjectClass>Code List Scheme</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Uniform Resource Identifier</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Identifier</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<!-- ===== CCT: DateTimeType ===== -->
|
||||
<!-- =================================================================== -->
|
||||
<xsd:complexType name="DateTimeType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000008</ccts:UniqueID>
|
||||
<ccts:CategoryCode>CCT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Date Time. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>A particular point in the progression of time together with the relevant supplementary
|
||||
information.
|
||||
</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Date Time</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
<ccts:UsageRule>Can be used for a date and/or time.</ccts:UsageRule>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:string">
|
||||
<xsd:attribute name="format" type="xsd:string" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000008-SC1</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Date Time. Format. Text</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The format of the date time content</ccts:Definition>
|
||||
<ccts:ObjectClass>Date Time</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Format</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Text</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<!-- ===== CCT: IdentifierType ===== -->
|
||||
<!-- =================================================================== -->
|
||||
<xsd:complexType name="IdentifierType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000011</ccts:UniqueID>
|
||||
<ccts:CategoryCode>CCT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Identifier. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>A character string to identify and distinguish uniquely, one instance of an object in
|
||||
an identification scheme from all other objects in the same scheme together with relevant
|
||||
supplementary information.
|
||||
</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Identifier</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:normalizedString">
|
||||
<xsd:attribute name="schemeID" type="xsd:normalizedString" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000011-SC2</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Identification Scheme. Identifier</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The identification of the identification scheme.</ccts:Definition>
|
||||
<ccts:ObjectClass>Identification Scheme</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Identification</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Identifier</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="schemeName" type="xsd:string" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000011-SC3</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Identification Scheme. Name. Text</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The name of the identification scheme.</ccts:Definition>
|
||||
<ccts:ObjectClass>Identification Scheme</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Name</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Text</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="schemeAgencyID" type="xsd:normalizedString" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000011-SC4</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Identification Scheme Agency. Identifier
|
||||
</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The identification of the agency that maintains the identification
|
||||
scheme.
|
||||
</ccts:Definition>
|
||||
<ccts:ObjectClass>Identification Scheme Agency</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Identification</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Identifier</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
<ccts:UsageRule>Defaults to the UN/EDIFACT data element 3055 code list.</ccts:UsageRule>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="schemeAgencyName" type="xsd:string" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000011-SC5</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Identification Scheme Agency. Name. Text
|
||||
</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The name of the agency that maintains the identification scheme.
|
||||
</ccts:Definition>
|
||||
<ccts:ObjectClass>Identification Scheme Agency</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Agency Name</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Text</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="schemeVersionID" type="xsd:normalizedString" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000011-SC6</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Identification Scheme. Version. Identifier
|
||||
</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The version of the identification scheme.</ccts:Definition>
|
||||
<ccts:ObjectClass>Identification Scheme</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Version</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Identifier</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="schemeDataURI" type="xsd:anyURI" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000011-SC7</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Identification Scheme Data. Uniform Resource. Identifier
|
||||
</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The Uniform Resource Identifier that identifies where the identification
|
||||
scheme data is located.
|
||||
</ccts:Definition>
|
||||
<ccts:ObjectClass>Identification Scheme Data</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Uniform Resource Identifier</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Identifier</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="schemeURI" type="xsd:anyURI" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000011-SC8</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Identification Scheme. Uniform Resource. Identifier
|
||||
</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The Uniform Resource Identifier that identifies where the identification
|
||||
scheme is located.
|
||||
</ccts:Definition>
|
||||
<ccts:ObjectClass>Identification Scheme</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Uniform Resource Identifier</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Identifier</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<!-- ===== CCT: IndicatorType ===== -->
|
||||
<!-- =================================================================== -->
|
||||
<xsd:complexType name="IndicatorType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000012</ccts:UniqueID>
|
||||
<ccts:CategoryCode>CCT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Indicator. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>A list of two mutually exclusive Boolean values that express the only possible states
|
||||
of a Property.
|
||||
</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Indicator</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:string">
|
||||
<xsd:attribute name="format" type="xsd:string" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000012-SC2</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Indicator. Format. Text</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>Whether the indicator is numeric, textual or binary.</ccts:Definition>
|
||||
<ccts:ObjectClass>Indicator</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Format</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Text</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<!-- ===== CCT: MeasureType ===== -->
|
||||
<!-- =================================================================== -->
|
||||
<xsd:complexType name="MeasureType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000013</ccts:UniqueID>
|
||||
<ccts:CategoryCode>CCT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Measure. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>A numeric value determined by measuring an object along with the specified unit of
|
||||
measure.
|
||||
</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Measure</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>decimal</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:decimal">
|
||||
<xsd:attribute name="unitCode" type="xsd:normalizedString" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000013-SC2</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Measure Unit. Code</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The type of unit of measure.</ccts:Definition>
|
||||
<ccts:ObjectClass>Measure Unit</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Code</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Code</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
<ccts:UsageRule>Reference UNECE Rec. 20 and X12 355</ccts:UsageRule>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="unitCodeListVersionID" type="xsd:normalizedString" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000013-SC3</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Measure Unit. Code List Version. Identifier
|
||||
</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The version of the measure unit code list.</ccts:Definition>
|
||||
<ccts:ObjectClass>Measure Unit</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Code List Version</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Identifier</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<!-- ===== CCT: NumericType ===== -->
|
||||
<!-- =================================================================== -->
|
||||
<xsd:complexType name="NumericType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000014</ccts:UniqueID>
|
||||
<ccts:CategoryCode>CCT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Numeric. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>Numeric information that is assigned or is determined by calculation, counting, or
|
||||
sequencing. It does not require a unit of quantity or unit of measure.
|
||||
</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Numeric</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:decimal">
|
||||
<xsd:attribute name="format" type="xsd:string" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000014-SC2</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Numeric. Format. Text</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>Whether the number is an integer, decimal, real number or percentage.
|
||||
</ccts:Definition>
|
||||
<ccts:ObjectClass>Numeric</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Format</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Text</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<!-- ===== CCT: QuantityType ===== -->
|
||||
<!-- =================================================================== -->
|
||||
<xsd:complexType name="QuantityType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000018</ccts:UniqueID>
|
||||
<ccts:CategoryCode>CCT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Quantity. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>A counted number of non-monetary units possibly including fractions.</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Quantity</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>decimal</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:decimal">
|
||||
<xsd:attribute name="unitCode" type="xsd:normalizedString" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000018-SC2</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Quantity. Unit. Code</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The unit of the quantity</ccts:Definition>
|
||||
<ccts:ObjectClass>Quantity</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Unit Code</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Code</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="unitCodeListID" type="xsd:normalizedString" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000018-SC3</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Quantity Unit. Code List. Identifier</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The quantity unit code list.</ccts:Definition>
|
||||
<ccts:ObjectClass>Quantity Unit</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Code List</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Identifier</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="unitCodeListAgencyID" type="xsd:normalizedString" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000018-SC4</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Quantity Unit. Code List Agency. Identifier
|
||||
</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The identification of the agency that maintains the quantity unit code
|
||||
list
|
||||
</ccts:Definition>
|
||||
<ccts:ObjectClass>Quantity Unit</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Code List Agency</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Identifier</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
<ccts:UsageRule>Defaults to the UN/EDIFACT data element 3055 code list.</ccts:UsageRule>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="unitCodeListAgencyName" type="xsd:string" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000018-SC5</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Quantity Unit. Code List Agency Name. Text
|
||||
</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The name of the agency which maintains the quantity unit code list.
|
||||
</ccts:Definition>
|
||||
<ccts:ObjectClass>Quantity Unit</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Code List Agency Name</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Text</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<!-- ===== CCT: TextType ===== -->
|
||||
<!-- =================================================================== -->
|
||||
<xsd:complexType name="TextType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000019</ccts:UniqueID>
|
||||
<ccts:CategoryCode>CCT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Text. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>A character string (i.e. a finite set of characters) generally in the form of words of
|
||||
a language.
|
||||
</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Text</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:string">
|
||||
<xsd:attribute name="languageID" type="xsd:language" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000019-SC2</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Language. Identifier</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The identifier of the language used in the content component.
|
||||
</ccts:Definition>
|
||||
<ccts:ObjectClass>Language</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Identification</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Identifier</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="languageLocaleID" type="xsd:normalizedString" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000019-SC3</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Language. Locale. Identifier</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The identification of the locale of the language.</ccts:Definition>
|
||||
<ccts:ObjectClass>Language</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Locale</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Identifier</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,235 @@
|
|||
<?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.
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
|
||||
xmlns:udt="urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2"
|
||||
xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"
|
||||
targetNamespace="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"
|
||||
elementFormDefault="qualified" attributeFormDefault="unqualified"
|
||||
version="2.1">
|
||||
<!-- ===== Imports ===== -->
|
||||
<xsd:import namespace="urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2"
|
||||
schemaLocation="UBL-UnqualifiedDataTypes-2.1.xsd" />
|
||||
<xsd:import namespace="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
|
||||
schemaLocation="UBL-CommonBasicComponents-2.1.xsd" />
|
||||
<!-- ===== Includes ===== -->
|
||||
<xsd:include schemaLocation="UBL-ExtensionContentDataType-2.1.xsd" />
|
||||
<!-- ===== Aggregate Element and Type Declarations ===== -->
|
||||
<xsd:element name="UBLExtensions" type="UBLExtensionsType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A container for all extensions present in the document.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:complexType name="UBLExtensionsType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A container for all extensions present in the document.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="UBLExtension" minOccurs="1" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A single extension for private use.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="UBLExtension" type="UBLExtensionType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A single extension for private use.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:complexType name="UBLExtensionType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A single extension for private use.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="cbc:ID" minOccurs="0" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
An identifier for the Extension assigned by the creator of the extension.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element ref="cbc:Name" minOccurs="0" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A name for the Extension assigned by the creator of the extension.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element ref="ExtensionAgencyID" minOccurs="0" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
An agency that maintains one or more Extensions.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element ref="ExtensionAgencyName" minOccurs="0" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
The name of the agency that maintains the Extension.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element ref="ExtensionVersionID" minOccurs="0" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
The version of the Extension.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element ref="ExtensionAgencyURI" minOccurs="0" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A URI for the Agency that maintains the Extension.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element ref="ExtensionURI" minOccurs="0" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A URI for the Extension.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element ref="ExtensionReasonCode" minOccurs="0" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A code for reason the Extension is being included.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element ref="ExtensionReason" minOccurs="0" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A description of the reason for the Extension.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element ref="ExtensionContent" minOccurs="1" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
The definition of the extension content.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- ===== Basic Element and Type Declarations ===== -->
|
||||
<xsd:element name="ExtensionAgencyID" type="ExtensionAgencyIDType" />
|
||||
<xsd:element name="ExtensionAgencyName" type="ExtensionAgencyNameType" />
|
||||
<xsd:element name="ExtensionAgencyURI" type="ExtensionAgencyURIType" />
|
||||
<xsd:element name="ExtensionContent" type="ExtensionContentType" />
|
||||
<xsd:element name="ExtensionReason" type="ExtensionReasonType" />
|
||||
<xsd:element name="ExtensionReasonCode" type="ExtensionReasonCodeType" />
|
||||
<xsd:element name="ExtensionURI" type="ExtensionURIType" />
|
||||
<xsd:element name="ExtensionVersionID" type="ExtensionVersionIDType" />
|
||||
<xsd:complexType name="ExtensionAgencyIDType">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="udt:IdentifierType" />
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ExtensionAgencyNameType">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="udt:TextType" />
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ExtensionAgencyURIType">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="udt:IdentifierType" />
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ExtensionReasonType">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="udt:TextType" />
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ExtensionReasonCodeType">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="udt:CodeType" />
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ExtensionURIType">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="udt:IdentifierType" />
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ExtensionVersionIDType">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="udt:IdentifierType" />
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
<!-- ===== Copyright Notice ===== -->
|
||||
<!--
|
||||
OASIS takes no position regarding the validity or scope of any
|
||||
intellectual property or other rights that might be claimed to pertain
|
||||
to the implementation or use of the technology described in this
|
||||
document or the extent to which any license under such rights
|
||||
might or might not be available; neither does it represent that it has
|
||||
made any effort to identify any such rights. Information on OASIS's
|
||||
procedures with respect to rights in OASIS specifications can be
|
||||
found at the OASIS website. Copies of claims of rights made
|
||||
available for publication and any assurances of licenses to be made
|
||||
available, or the result of an attempt made to obtain a general
|
||||
license or permission for the use of such proprietary rights by
|
||||
implementors or users of this specification, can be obtained from
|
||||
the OASIS Executive Director.
|
||||
|
||||
OASIS invites any interested party to bring to its attention any
|
||||
copyrights, patents or patent applications, or other proprietary
|
||||
rights which may cover technology that may be required to
|
||||
implement this specification. Please address the information to the
|
||||
OASIS Executive Director.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain
|
||||
it or assist in its implementation may be prepared, copied,
|
||||
published and distributed, in whole or in part, without restriction of
|
||||
any kind, provided that the above copyright notice and this
|
||||
paragraph are included on all such copies and derivative works.
|
||||
However, this document itself may not be modified in any way,
|
||||
such as by removing the copyright notice or references to OASIS,
|
||||
except as needed for the purpose of developing OASIS
|
||||
specifications, in which case the procedures for copyrights defined
|
||||
in the OASIS Intellectual Property Rights document must be
|
||||
followed, or as required to translate it into languages other than
|
||||
English.
|
||||
|
||||
The limited permissions granted above are perpetual and will not be
|
||||
revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on
|
||||
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
|
||||
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
|
||||
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
|
||||
PARTICULAR PURPOSE.
|
||||
-->
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
<?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.
|
||||
-->
|
||||
<xsd:schema xmlns:sac="urn:oasis:names:specification:ubl:schema:xsd:SignatureAggregateComponents-2"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonSignatureComponents-2"
|
||||
targetNamespace="urn:oasis:names:specification:ubl:schema:xsd:CommonSignatureComponents-2"
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified"
|
||||
version="2.1">
|
||||
<xsd:import namespace="urn:oasis:names:specification:ubl:schema:xsd:SignatureAggregateComponents-2"
|
||||
schemaLocation="UBL-SignatureAggregateComponents-2.1.xsd" />
|
||||
<xsd:element name="UBLDocumentSignatures" type="UBLDocumentSignaturesType" />
|
||||
<xsd:complexType name="UBLDocumentSignaturesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="sac:SignatureInformation" minOccurs="1" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
<!-- ===== Copyright Notice ===== --><!--
|
||||
OASIS takes no position regarding the validity or scope of any
|
||||
intellectual property or other rights that might be claimed to pertain
|
||||
to the implementation or use of the technology described in this
|
||||
document or the extent to which any license under such rights
|
||||
might or might not be available; neither does it represent that it has
|
||||
made any effort to identify any such rights. Information on OASIS's
|
||||
procedures with respect to rights in OASIS specifications can be
|
||||
found at the OASIS website. Copies of claims of rights made
|
||||
available for publication and any assurances of licenses to be made
|
||||
available, or the result of an attempt made to obtain a general
|
||||
license or permission for the use of such proprietary rights by
|
||||
implementors or users of this specification, can be obtained from
|
||||
the OASIS Executive Director.
|
||||
|
||||
OASIS invites any interested party to bring to its attention any
|
||||
copyrights, patents or patent applications, or other proprietary
|
||||
rights which may cover technology that may be required to
|
||||
implement this specification. Please address the information to the
|
||||
OASIS Executive Director.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain
|
||||
it or assist in its implementation may be prepared, copied,
|
||||
published and distributed, in whole or in part, without restriction of
|
||||
any kind, provided that the above copyright notice and this
|
||||
paragraph are included on all such copies and derivative works.
|
||||
However, this document itself may not be modified in any way,
|
||||
such as by removing the copyright notice or references to OASIS,
|
||||
except as needed for the purpose of developing OASIS
|
||||
specifications, in which case the procedures for copyrights defined
|
||||
in the OASIS Intellectual Property Rights document must be
|
||||
followed, or as required to translate it into languages other than
|
||||
English.
|
||||
|
||||
The limited permissions granted above are perpetual and will not be
|
||||
revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on
|
||||
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
|
||||
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
|
||||
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
|
||||
PARTICULAR PURPOSE.
|
||||
-->
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
<?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.
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="urn:un:unece:uncefact:documentation:2"
|
||||
xmlns="urn:un:unece:uncefact:documentation:2"
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified"
|
||||
version="2.1">
|
||||
</xsd:schema>
|
||||
<!-- ===== Copyright Notice ===== -->
|
||||
<!--
|
||||
OASIS takes no position regarding the validity or scope of any
|
||||
intellectual property or other rights that might be claimed to pertain
|
||||
to the implementation or use of the technology described in this
|
||||
document or the extent to which any license under such rights
|
||||
might or might not be available; neither does it represent that it has
|
||||
made any effort to identify any such rights. Information on OASIS's
|
||||
procedures with respect to rights in OASIS specifications can be
|
||||
found at the OASIS website. Copies of claims of rights made
|
||||
available for publication and any assurances of licenses to be made
|
||||
available, or the result of an attempt made to obtain a general
|
||||
license or permission for the use of such proprietary rights by
|
||||
implementors or users of this specification, can be obtained from
|
||||
the OASIS Executive Director.
|
||||
|
||||
OASIS invites any interested party to bring to its attention any
|
||||
copyrights, patents or patent applications, or other proprietary
|
||||
rights which may cover technology that may be required to
|
||||
implement this specification. Please address the information to the
|
||||
OASIS Executive Director.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain
|
||||
it or assist in its implementation may be prepared, copied,
|
||||
published and distributed, in whole or in part, without restriction of
|
||||
any kind, provided that the above copyright notice and this
|
||||
paragraph are included on all such copies and derivative works.
|
||||
However, this document itself may not be modified in any way,
|
||||
such as by removing the copyright notice or references to OASIS,
|
||||
except as needed for the purpose of developing OASIS
|
||||
specifications, in which case the procedures for copyrights defined
|
||||
in the OASIS Intellectual Property Rights document must be
|
||||
followed, or as required to translate it into languages other than
|
||||
English.
|
||||
|
||||
The limited permissions granted above are perpetual and will not be
|
||||
revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on
|
||||
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
|
||||
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
|
||||
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
|
||||
PARTICULAR PURPOSE.
|
||||
-->
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
<?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.
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns=
|
||||
"urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"
|
||||
targetNamespace=
|
||||
"urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified"
|
||||
version="2.1">
|
||||
|
||||
<!--import here all extension schemas-->
|
||||
<xsd:import namespace=
|
||||
"urn:oasis:names:specification:ubl:schema:xsd:CommonSignatureComponents-2"
|
||||
schemaLocation="UBL-CommonSignatureComponents-2.1.xsd" />
|
||||
|
||||
<!-- ===== Type Declaration ===== -->
|
||||
<xsd:complexType name="ExtensionContentType">
|
||||
<xsd:sequence>
|
||||
<xsd:any namespace="##other" processContents="lax"
|
||||
minOccurs="1" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Any element in any namespace other than the UBL extension
|
||||
namespace is allowed to be the apex element of an extension.
|
||||
Only those elements found in the UBL schemas and in the
|
||||
trees of schemas imported in this module are validated.
|
||||
Any element for which there is no schema declaration in any
|
||||
of the trees of schemas passes validation and is not
|
||||
treated as a schema constraint violation.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:any>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
<!-- ===== Copyright Notice ===== -->
|
||||
<!--
|
||||
OASIS takes no position regarding the validity or scope of any
|
||||
intellectual property or other rights that might be claimed to pertain
|
||||
to the implementation or use of the technology described in this
|
||||
document or the extent to which any license under such rights
|
||||
might or might not be available; neither does it represent that it has
|
||||
made any effort to identify any such rights. Information on OASIS's
|
||||
procedures with respect to rights in OASIS specifications can be
|
||||
found at the OASIS website. Copies of claims of rights made
|
||||
available for publication and any assurances of licenses to be made
|
||||
available, or the result of an attempt made to obtain a general
|
||||
license or permission for the use of such proprietary rights by
|
||||
implementors or users of this specification, can be obtained from
|
||||
the OASIS Executive Director.
|
||||
|
||||
OASIS invites any interested party to bring to its attention any
|
||||
copyrights, patents or patent applications, or other proprietary
|
||||
rights which may cover technology that may be required to
|
||||
implement this specification. Please address the information to the
|
||||
OASIS Executive Director.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain
|
||||
it or assist in its implementation may be prepared, copied,
|
||||
published and distributed, in whole or in part, without restriction of
|
||||
any kind, provided that the above copyright notice and this
|
||||
paragraph are included on all such copies and derivative works.
|
||||
However, this document itself may not be modified in any way,
|
||||
such as by removing the copyright notice or references to OASIS,
|
||||
except as needed for the purpose of developing OASIS
|
||||
specifications, in which case the procedures for copyrights defined
|
||||
in the OASIS Intellectual Property Rights document must be
|
||||
followed, or as required to translate it into languages other than
|
||||
English.
|
||||
|
||||
The limited permissions granted above are perpetual and will not be
|
||||
revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on
|
||||
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
|
||||
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
|
||||
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
|
||||
PARTICULAR PURPOSE.
|
||||
-->
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
<?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.
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDataTypes-2"
|
||||
xmlns="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDataTypes-2"
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified"
|
||||
version="2.1">
|
||||
<!-- ===== Imports ===== -->
|
||||
<xsd:import namespace="urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2"
|
||||
schemaLocation="UBL-UnqualifiedDataTypes-2.1.xsd" />
|
||||
<!-- ===== Type Definitions ===== -->
|
||||
<!--no qualified data types defined at this time-->
|
||||
</xsd:schema>
|
||||
<!-- ===== Copyright Notice ===== -->
|
||||
<!--
|
||||
OASIS takes no position regarding the validity or scope of any
|
||||
intellectual property or other rights that might be claimed to pertain
|
||||
to the implementation or use of the technology described in this
|
||||
document or the extent to which any license under such rights
|
||||
might or might not be available; neither does it represent that it has
|
||||
made any effort to identify any such rights. Information on OASIS's
|
||||
procedures with respect to rights in OASIS specifications can be
|
||||
found at the OASIS website. Copies of claims of rights made
|
||||
available for publication and any assurances of licenses to be made
|
||||
available, or the result of an attempt made to obtain a general
|
||||
license or permission for the use of such proprietary rights by
|
||||
implementors or users of this specification, can be obtained from
|
||||
the OASIS Executive Director.
|
||||
|
||||
OASIS invites any interested party to bring to its attention any
|
||||
copyrights, patents or patent applications, or other proprietary
|
||||
rights which may cover technology that may be required to
|
||||
implement this specification. Please address the information to the
|
||||
OASIS Executive Director.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain
|
||||
it or assist in its implementation may be prepared, copied,
|
||||
published and distributed, in whole or in part, without restriction of
|
||||
any kind, provided that the above copyright notice and this
|
||||
paragraph are included on all such copies and derivative works.
|
||||
However, this document itself may not be modified in any way,
|
||||
such as by removing the copyright notice or references to OASIS,
|
||||
except as needed for the purpose of developing OASIS
|
||||
specifications, in which case the procedures for copyrights defined
|
||||
in the OASIS Intellectual Property Rights document must be
|
||||
followed, or as required to translate it into languages other than
|
||||
English.
|
||||
|
||||
The limited permissions granted above are perpetual and will not be
|
||||
revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on
|
||||
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
|
||||
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
|
||||
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
|
||||
PARTICULAR PURPOSE.
|
||||
-->
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
<?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.
|
||||
-->
|
||||
<xsd:schema xmlns:sbc="urn:oasis:names:specification:ubl:schema:xsd:SignatureBasicComponents-2"
|
||||
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
|
||||
xmlns="urn:oasis:names:specification:ubl:schema:xsd:SignatureAggregateComponents-2"
|
||||
targetNamespace="urn:oasis:names:specification:ubl:schema:xsd:SignatureAggregateComponents-2"
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified"
|
||||
version="2.1">
|
||||
<xsd:import namespace="urn:oasis:names:specification:ubl:schema:xsd:SignatureBasicComponents-2"
|
||||
schemaLocation="UBL-SignatureBasicComponents-2.1.xsd" />
|
||||
<xsd:import namespace="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
|
||||
schemaLocation="UBL-CommonBasicComponents-2.1.xsd" />
|
||||
|
||||
<!-- ===== Incorporate W3C signature specification-->
|
||||
<xsd:import namespace="http://www.w3.org/2000/09/xmldsig#"
|
||||
schemaLocation="UBL-xmldsig-core-schema-2.1.xsd" />
|
||||
|
||||
<!-- ===== Incorporate ETSI signature specifications-->
|
||||
<xsd:import namespace="http://uri.etsi.org/01903/v1.3.2#"
|
||||
schemaLocation="UBL-XAdESv132-2.1.xsd" />
|
||||
<xsd:import namespace="http://uri.etsi.org/01903/v1.4.1#"
|
||||
schemaLocation="UBL-XAdESv141-2.1.xsd" />
|
||||
<xsd:element name="SignatureInformation" type="SignatureInformationType" />
|
||||
<xsd:complexType name="SignatureInformationType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="cbc:ID" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="sbc:ReferencedSignatureID" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="ds:Signature" minOccurs="0" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>This is a single digital signature as defined by the W3C specification.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
<!-- ===== Copyright Notice ===== --><!--
|
||||
OASIS takes no position regarding the validity or scope of any
|
||||
intellectual property or other rights that might be claimed to pertain
|
||||
to the implementation or use of the technology described in this
|
||||
document or the extent to which any license under such rights
|
||||
might or might not be available; neither does it represent that it has
|
||||
made any effort to identify any such rights. Information on OASIS's
|
||||
procedures with respect to rights in OASIS specifications can be
|
||||
found at the OASIS website. Copies of claims of rights made
|
||||
available for publication and any assurances of licenses to be made
|
||||
available, or the result of an attempt made to obtain a general
|
||||
license or permission for the use of such proprietary rights by
|
||||
implementors or users of this specification, can be obtained from
|
||||
the OASIS Executive Director.
|
||||
|
||||
OASIS invites any interested party to bring to its attention any
|
||||
copyrights, patents or patent applications, or other proprietary
|
||||
rights which may cover technology that may be required to
|
||||
implement this specification. Please address the information to the
|
||||
OASIS Executive Director.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain
|
||||
it or assist in its implementation may be prepared, copied,
|
||||
published and distributed, in whole or in part, without restriction of
|
||||
any kind, provided that the above copyright notice and this
|
||||
paragraph are included on all such copies and derivative works.
|
||||
However, this document itself may not be modified in any way,
|
||||
such as by removing the copyright notice or references to OASIS,
|
||||
except as needed for the purpose of developing OASIS
|
||||
specifications, in which case the procedures for copyrights defined
|
||||
in the OASIS Intellectual Property Rights document must be
|
||||
followed, or as required to translate it into languages other than
|
||||
English.
|
||||
|
||||
The limited permissions granted above are perpetual and will not be
|
||||
revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on
|
||||
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
|
||||
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
|
||||
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
|
||||
PARTICULAR PURPOSE.
|
||||
-->
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
<?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.
|
||||
-->
|
||||
<xsd:schema xmlns:udt="urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns="urn:oasis:names:specification:ubl:schema:xsd:SignatureBasicComponents-2"
|
||||
targetNamespace="urn:oasis:names:specification:ubl:schema:xsd:SignatureBasicComponents-2"
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified"
|
||||
version="2.1">
|
||||
<xsd:import namespace="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDataTypes-2"
|
||||
schemaLocation="UBL-QualifiedDataTypes-2.1.xsd" />
|
||||
<xsd:import namespace="urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2"
|
||||
schemaLocation="UBL-UnqualifiedDataTypes-2.1.xsd" />
|
||||
<xsd:element name="ReferencedSignatureID" type="ReferencedSignatureIDType" />
|
||||
<xsd:complexType name="ReferencedSignatureIDType">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="udt:IdentifierType" />
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
<!-- ===== Copyright Notice ===== --><!--
|
||||
OASIS takes no position regarding the validity or scope of any
|
||||
intellectual property or other rights that might be claimed to pertain
|
||||
to the implementation or use of the technology described in this
|
||||
document or the extent to which any license under such rights
|
||||
might or might not be available; neither does it represent that it has
|
||||
made any effort to identify any such rights. Information on OASIS's
|
||||
procedures with respect to rights in OASIS specifications can be
|
||||
found at the OASIS website. Copies of claims of rights made
|
||||
available for publication and any assurances of licenses to be made
|
||||
available, or the result of an attempt made to obtain a general
|
||||
license or permission for the use of such proprietary rights by
|
||||
implementors or users of this specification, can be obtained from
|
||||
the OASIS Executive Director.
|
||||
|
||||
OASIS invites any interested party to bring to its attention any
|
||||
copyrights, patents or patent applications, or other proprietary
|
||||
rights which may cover technology that may be required to
|
||||
implement this specification. Please address the information to the
|
||||
OASIS Executive Director.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain
|
||||
it or assist in its implementation may be prepared, copied,
|
||||
published and distributed, in whole or in part, without restriction of
|
||||
any kind, provided that the above copyright notice and this
|
||||
paragraph are included on all such copies and derivative works.
|
||||
However, this document itself may not be modified in any way,
|
||||
such as by removing the copyright notice or references to OASIS,
|
||||
except as needed for the purpose of developing OASIS
|
||||
specifications, in which case the procedures for copyrights defined
|
||||
in the OASIS Intellectual Property Rights document must be
|
||||
followed, or as required to translate it into languages other than
|
||||
English.
|
||||
|
||||
The limited permissions granted above are perpetual and will not be
|
||||
revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on
|
||||
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
|
||||
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
|
||||
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
|
||||
PARTICULAR PURPOSE.
|
||||
-->
|
||||
|
|
@ -0,0 +1,554 @@
|
|||
<?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.
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:ccts-cct="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModule:2"
|
||||
xmlns:ccts="urn:un:unece:uncefact:documentation:2"
|
||||
targetNamespace="urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2"
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified"
|
||||
version="2.1">
|
||||
<!-- ===== Imports ===== -->
|
||||
<xsd:import schemaLocation="CCTS_CCT_SchemaModule-2.1.xsd"
|
||||
namespace="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModule:2" />
|
||||
<!-- ===== Type Definitions ===== -->
|
||||
<xsd:complexType name="AmountType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UBLUDT000001</ccts:UniqueID>
|
||||
<ccts:CategoryCode>UDT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Amount. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>A number of monetary units specified using a given unit of currency.</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Amount</ccts:RepresentationTermName>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:restriction base="ccts-cct:AmountType">
|
||||
<xsd:attribute name="currencyID" type="xsd:normalizedString" use="required">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000001-SC2</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Amount. Currency. Identifier</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The currency of the amount.</ccts:Definition>
|
||||
<ccts:ObjectClass>Amount Currency</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Identification</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Identifier</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
<ccts:UsageRule>Reference UNECE Rec 9, using 3-letter alphabetic codes.</ccts:UsageRule>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="BinaryObjectType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UBLUDT000002</ccts:UniqueID>
|
||||
<ccts:CategoryCode>UDT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Binary Object. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>A set of finite-length sequences of binary octets.</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Binary Object</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>binary</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:restriction base="ccts-cct:BinaryObjectType">
|
||||
<xsd:attribute name="mimeCode" type="xsd:normalizedString" use="required">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000002-SC3</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Binary Object. Mime. Code</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The mime type of the binary object.</ccts:Definition>
|
||||
<ccts:ObjectClass>Binary Object</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Mime</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Code</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="GraphicType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UBLUDT000003</ccts:UniqueID>
|
||||
<ccts:CategoryCode>UDT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Graphic. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>A diagram, graph, mathematical curve, or similar representation.</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Graphic</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>binary</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:restriction base="ccts-cct:BinaryObjectType">
|
||||
<xsd:attribute name="mimeCode" type="xsd:normalizedString" use="required">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000003-SC3</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Graphic. Mime. Code</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The mime type of the graphic object.</ccts:Definition>
|
||||
<ccts:ObjectClass>Graphic</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Mime</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Code</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>normalizedString</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="PictureType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UBLUDT000004</ccts:UniqueID>
|
||||
<ccts:CategoryCode>UDT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Picture. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>A diagram, graph, mathematical curve, or similar representation.</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Picture</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>binary</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:restriction base="ccts-cct:BinaryObjectType">
|
||||
<xsd:attribute name="mimeCode" type="xsd:normalizedString" use="required">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000004-SC3</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Picture. Mime. Code</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The mime type of the picture object.</ccts:Definition>
|
||||
<ccts:ObjectClass>Picture</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Mime</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Code</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>normalizedString</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="SoundType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UBLUDT000005</ccts:UniqueID>
|
||||
<ccts:CategoryCode>UDT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Sound. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>An audio representation.</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Sound</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>binary</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:restriction base="ccts-cct:BinaryObjectType">
|
||||
<xsd:attribute name="mimeCode" type="xsd:normalizedString" use="required">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000005-SC3</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Sound. Mime. Code</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The mime type of the sound object.</ccts:Definition>
|
||||
<ccts:ObjectClass>Sound</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Mime</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Code</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>normalizedString</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="VideoType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UBLUDT000006</ccts:UniqueID>
|
||||
<ccts:CategoryCode>UDT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Video. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>A video representation.</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Video</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>binary</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:restriction base="ccts-cct:BinaryObjectType">
|
||||
<xsd:attribute name="mimeCode" type="xsd:normalizedString" use="required">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000006-SC3</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Video. Mime. Code</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The mime type of the video object.</ccts:Definition>
|
||||
<ccts:ObjectClass>Video</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Mime</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Code</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>normalizedString</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="CodeType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UBLUDT000007</ccts:UniqueID>
|
||||
<ccts:CategoryCode>UDT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Code. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>A character string (letters, figures, or symbols) that for brevity and/or language
|
||||
independence may be used to represent or replace a definitive value or text of an attribute,
|
||||
together with relevant supplementary information.
|
||||
</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Code</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
<ccts:UsageRule>Other supplementary components in the CCT are captured as part of the token and name for
|
||||
the schema module containing the code list and thus, are not declared as attributes.
|
||||
</ccts:UsageRule>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="ccts-cct:CodeType" />
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="DateTimeType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UBLUDT000008</ccts:UniqueID>
|
||||
<ccts:CategoryCode>UDT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Date Time. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>A particular point in the progression of time, together with relevant supplementary
|
||||
information.
|
||||
</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Date Time</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
<ccts:UsageRule>Can be used for a date and/or time.</ccts:UsageRule>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:dateTime" />
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="DateType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UBLUDT000009</ccts:UniqueID>
|
||||
<ccts:CategoryCode>UDT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Date. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>One calendar day according the Gregorian calendar.</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Date</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:date" />
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="TimeType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UBLUDT0000010</ccts:UniqueID>
|
||||
<ccts:CategoryCode>UDT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Time. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>An instance of time that occurs every day.</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Time</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:time" />
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="IdentifierType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UBLUDT0000011</ccts:UniqueID>
|
||||
<ccts:CategoryCode>UDT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Identifier. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>A character string to identify and uniquely distinguish one instance of an object in an
|
||||
identification scheme from all other objects in the same scheme, together with relevant
|
||||
supplementary information.
|
||||
</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Identifier</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
<ccts:UsageRule>Other supplementary components in the CCT are captured as part of the token and name for
|
||||
the schema module containing the identifier list and thus, are not declared as attributes.
|
||||
</ccts:UsageRule>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="ccts-cct:IdentifierType" />
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="IndicatorType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UBLUDT0000012</ccts:UniqueID>
|
||||
<ccts:CategoryCode>UDT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Indicator. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>A list of two mutually exclusive Boolean values that express the only possible states
|
||||
of a property.
|
||||
</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Indicator</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:boolean" />
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="MeasureType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UBLUDT0000013</ccts:UniqueID>
|
||||
<ccts:CategoryCode>UDT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Measure. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>A numeric value determined by measuring an object using a specified unit of measure.
|
||||
</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Measure</ccts:RepresentationTermName>
|
||||
<ccts:PropertyTermName>Type</ccts:PropertyTermName>
|
||||
<ccts:PrimitiveType>decimal</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:restriction base="ccts-cct:MeasureType">
|
||||
<xsd:attribute name="unitCode" type="xsd:normalizedString" use="required">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UNDT000013-SC2</ccts:UniqueID>
|
||||
<ccts:CategoryCode>SC</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Measure. Unit. Code</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>The type of unit of measure.</ccts:Definition>
|
||||
<ccts:ObjectClass>Measure Unit</ccts:ObjectClass>
|
||||
<ccts:PropertyTermName>Code</ccts:PropertyTermName>
|
||||
<ccts:RepresentationTermName>Code</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>normalizedString</ccts:PrimitiveType>
|
||||
<ccts:UsageRule>Reference UNECE Rec. 20 and X12 355</ccts:UsageRule>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="NumericType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UBLUDT0000014</ccts:UniqueID>
|
||||
<ccts:CategoryCode>UDT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Numeric. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>Numeric information that is assigned or is determined by calculation, counting, or
|
||||
sequencing. It does not require a unit of quantity or unit of measure.
|
||||
</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Numeric</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="ccts-cct:NumericType" />
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="ValueType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UBLUDT0000015</ccts:UniqueID>
|
||||
<ccts:CategoryCode>UDT</ccts:CategoryCode>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:DictionaryEntryName>Value. Type</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>Numeric information that is assigned or is determined by calculation, counting, or
|
||||
sequencing. It does not require a unit of quantity or unit of measure.
|
||||
</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Value</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="ccts-cct:NumericType" />
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="PercentType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UBLUDT0000016</ccts:UniqueID>
|
||||
<ccts:CategoryCode>UDT</ccts:CategoryCode>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:DictionaryEntryName>Percent. Type</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>Numeric information that is assigned or is determined by calculation, counting, or
|
||||
sequencing and is expressed as a percentage. It does not require a unit of quantity or unit of
|
||||
measure.
|
||||
</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Percent</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="ccts-cct:NumericType" />
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="RateType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UBLUDT0000017</ccts:UniqueID>
|
||||
<ccts:CategoryCode>UDT</ccts:CategoryCode>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:DictionaryEntryName>Rate. Type</ccts:DictionaryEntryName>
|
||||
<ccts:Definition>A numeric expression of a rate that is assigned or is determined by calculation,
|
||||
counting, or sequencing. It does not require a unit of quantity or unit of measure.
|
||||
</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Rate</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="ccts-cct:NumericType" />
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="QuantityType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UBLUDT0000018</ccts:UniqueID>
|
||||
<ccts:CategoryCode>UDT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Quantity. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>A counted number of non-monetary units, possibly including a fractional part.
|
||||
</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Quantity</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>decimal</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="ccts-cct:QuantityType" />
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="TextType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UBLUDT0000019</ccts:UniqueID>
|
||||
<ccts:CategoryCode>UDT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Text. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>A character string (i.e. a finite set of characters), generally in the form of words of
|
||||
a language.
|
||||
</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Text</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="ccts-cct:TextType" />
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="NameType">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
<ccts:UniqueID>UBLUDT0000020</ccts:UniqueID>
|
||||
<ccts:CategoryCode>UDT</ccts:CategoryCode>
|
||||
<ccts:DictionaryEntryName>Name. Type</ccts:DictionaryEntryName>
|
||||
<ccts:VersionID>1.0</ccts:VersionID>
|
||||
<ccts:Definition>A character string that constitutes the distinctive designation of a person, place,
|
||||
thing or concept.
|
||||
</ccts:Definition>
|
||||
<ccts:RepresentationTermName>Name</ccts:RepresentationTermName>
|
||||
<ccts:PrimitiveType>string</ccts:PrimitiveType>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="ccts-cct:TextType" />
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
</xsd:schema><!-- ===== Copyright Notice ===== --><!--
|
||||
OASIS takes no position regarding the validity or scope of any
|
||||
intellectual property or other rights that might be claimed to pertain
|
||||
to the implementation or use of the technology described in this
|
||||
document or the extent to which any license under such rights
|
||||
might or might not be available; neither does it represent that it has
|
||||
made any effort to identify any such rights. Information on OASIS's
|
||||
procedures with respect to rights in OASIS specifications can be
|
||||
found at the OASIS website. Copies of claims of rights made
|
||||
available for publication and any assurances of licenses to be made
|
||||
available, or the result of an attempt made to obtain a general
|
||||
license or permission for the use of such proprietary rights by
|
||||
implementors or users of this specification, can be obtained from
|
||||
the OASIS Executive Director.
|
||||
|
||||
OASIS invites any interested party to bring to its attention any
|
||||
copyrights, patents or patent applications, or other proprietary
|
||||
rights which may cover technology that may be required to
|
||||
implement this specification. Please address the information to the
|
||||
OASIS Executive Director.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain
|
||||
it or assist in its implementation may be prepared, copied,
|
||||
published and distributed, in whole or in part, without restriction of
|
||||
any kind, provided that the above copyright notice and this
|
||||
paragraph are included on all such copies and derivative works.
|
||||
However, this document itself may not be modified in any way,
|
||||
such as by removing the copyright notice or references to OASIS,
|
||||
except as needed for the purpose of developing OASIS
|
||||
specifications, in which case the procedures for copyrights defined
|
||||
in the OASIS Intellectual Property Rights document must be
|
||||
followed, or as required to translate it into languages other than
|
||||
English.
|
||||
|
||||
The limited permissions granted above are perpetual and will not be
|
||||
revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on
|
||||
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
|
||||
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
|
||||
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
|
||||
PARTICULAR PURPOSE.
|
||||
-->
|
||||
|
|
@ -0,0 +1,499 @@
|
|||
<?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.
|
||||
-->
|
||||
|
||||
<!--
|
||||
Library: OASIS Universal Business Language (UBL) 2.1 OS
|
||||
http://docs.oasis-open.org/ubl/os-UBL-2.1/
|
||||
Release Date: 04 November 2013
|
||||
Module: UBL-XAdESv132-2.1.xsd
|
||||
Generated on: 2011-02-21 17:20(UTC)
|
||||
|
||||
This is a copy of http://uri.etsi.org/01903/v1.3.2/XAdES.xsd modified
|
||||
only to change the importing URI for the XML DSig schema.
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
|
||||
targetNamespace="http://uri.etsi.org/01903/v1.3.2#" xmlns="http://uri.etsi.org/01903/v1.3.2#"
|
||||
elementFormDefault="qualified">
|
||||
<xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="UBL-xmldsig-core-schema-2.1.xsd" />
|
||||
<!-- Start auxiliary types definitions: AnyType, ObjectIdentifierType,
|
||||
EncapsulatedPKIDataType and containers for time-stamp tokens -->
|
||||
<!-- Start AnyType -->
|
||||
<xsd:element name="Any" type="AnyType" />
|
||||
<xsd:complexType name="AnyType" mixed="true">
|
||||
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:any namespace="##any" processContents="lax" />
|
||||
</xsd:sequence>
|
||||
<xsd:anyAttribute namespace="##any" />
|
||||
</xsd:complexType>
|
||||
<!-- End AnyType -->
|
||||
<!-- Start ObjectIdentifierType-->
|
||||
<xsd:element name="ObjectIdentifier" type="ObjectIdentifierType" />
|
||||
<xsd:complexType name="ObjectIdentifierType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Identifier" type="IdentifierType" />
|
||||
<xsd:element name="Description" type="xsd:string" minOccurs="0" />
|
||||
<xsd:element name="DocumentationReferences" type="DocumentationReferencesType" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="IdentifierType">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:anyURI">
|
||||
<xsd:attribute name="Qualifier" type="QualifierType" use="optional" />
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="QualifierType">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="OIDAsURI" />
|
||||
<xsd:enumeration value="OIDAsURN" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:complexType name="DocumentationReferencesType">
|
||||
<xsd:sequence maxOccurs="unbounded">
|
||||
<xsd:element name="DocumentationReference" type="xsd:anyURI" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End ObjectIdentifierType-->
|
||||
<!-- Start EncapsulatedPKIDataType-->
|
||||
<xsd:element name="EncapsulatedPKIData" type="EncapsulatedPKIDataType" />
|
||||
<xsd:complexType name="EncapsulatedPKIDataType">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:base64Binary">
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional" />
|
||||
<xsd:attribute name="Encoding" type="xsd:anyURI" use="optional" />
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
<!-- End EncapsulatedPKIDataType -->
|
||||
<!-- Start time-stamp containers types -->
|
||||
<!-- Start GenericTimeStampType -->
|
||||
<xsd:element name="Include" type="IncludeType" />
|
||||
<xsd:complexType name="IncludeType">
|
||||
<xsd:attribute name="URI" type="xsd:anyURI" use="required" />
|
||||
<xsd:attribute name="referencedData" type="xsd:boolean" use="optional" />
|
||||
</xsd:complexType>
|
||||
<xsd:element name="ReferenceInfo" type="ReferenceInfoType" />
|
||||
<xsd:complexType name="ReferenceInfoType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="ds:DigestMethod" />
|
||||
<xsd:element ref="ds:DigestValue" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional" />
|
||||
<xsd:attribute name="URI" type="xsd:anyURI" use="optional" />
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="GenericTimeStampType" abstract="true">
|
||||
<xsd:sequence>
|
||||
<xsd:choice minOccurs="0">
|
||||
<xsd:element ref="Include" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element ref="ReferenceInfo" maxOccurs="unbounded" />
|
||||
</xsd:choice>
|
||||
<xsd:element ref="ds:CanonicalizationMethod" minOccurs="0" />
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType" />
|
||||
<xsd:element name="XMLTimeStamp" type="AnyType" />
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional" />
|
||||
</xsd:complexType>
|
||||
<!-- End GenericTimeStampType -->
|
||||
<!-- Start XAdESTimeStampType -->
|
||||
<xsd:element name="XAdESTimeStamp" type="XAdESTimeStampType" />
|
||||
<xsd:complexType name="XAdESTimeStampType">
|
||||
<xsd:complexContent>
|
||||
<xsd:restriction base="GenericTimeStampType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="Include" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element ref="ds:CanonicalizationMethod" minOccurs="0" />
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType" />
|
||||
<xsd:element name="XMLTimeStamp" type="AnyType" />
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional" />
|
||||
</xsd:restriction>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<!-- End XAdESTimeStampType -->
|
||||
<!-- Start OtherTimeStampType -->
|
||||
<xsd:element name="OtherTimeStamp" type="OtherTimeStampType" />
|
||||
<xsd:complexType name="OtherTimeStampType">
|
||||
<xsd:complexContent>
|
||||
<xsd:restriction base="GenericTimeStampType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="ReferenceInfo" maxOccurs="unbounded" />
|
||||
<xsd:element ref="ds:CanonicalizationMethod" minOccurs="0" />
|
||||
<xsd:choice>
|
||||
<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType" />
|
||||
<xsd:element name="XMLTimeStamp" type="AnyType" />
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional" />
|
||||
</xsd:restriction>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<!-- End OtherTimeStampType -->
|
||||
<!-- End time-stamp containers types -->
|
||||
<!-- End auxiliary types definitions-->
|
||||
<!-- Start container types -->
|
||||
<!-- Start QualifyingProperties -->
|
||||
<xsd:element name="QualifyingProperties" type="QualifyingPropertiesType" />
|
||||
<xsd:complexType name="QualifyingPropertiesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="SignedProperties" type="SignedPropertiesType" minOccurs="0" />
|
||||
<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Target" type="xsd:anyURI" use="required" />
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional" />
|
||||
</xsd:complexType>
|
||||
<!-- End QualifyingProperties -->
|
||||
<!-- Start SignedProperties-->
|
||||
<xsd:element name="SignedProperties" type="SignedPropertiesType" />
|
||||
<xsd:complexType name="SignedPropertiesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType" minOccurs="0" />
|
||||
<xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional" />
|
||||
</xsd:complexType>
|
||||
<!-- End SignedProperties-->
|
||||
<!-- Start UnsignedProperties-->
|
||||
<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType" />
|
||||
<xsd:complexType name="UnsignedPropertiesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType" minOccurs="0" />
|
||||
<xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional" />
|
||||
</xsd:complexType>
|
||||
<!-- End UnsignedProperties-->
|
||||
<!-- Start SignedSignatureProperties-->
|
||||
<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType" />
|
||||
<xsd:complexType name="SignedSignaturePropertiesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="SigningTime" type="xsd:dateTime" minOccurs="0" />
|
||||
<xsd:element name="SigningCertificate" type="CertIDListType" minOccurs="0" />
|
||||
<xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType" minOccurs="0" />
|
||||
<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType" minOccurs="0" />
|
||||
<xsd:element name="SignerRole" type="SignerRoleType" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional" />
|
||||
</xsd:complexType>
|
||||
<!-- End SignedSignatureProperties-->
|
||||
<!-- Start SignedDataObjectProperties-->
|
||||
<xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType" />
|
||||
<xsd:complexType name="SignedDataObjectPropertiesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="DataObjectFormat" type="DataObjectFormatType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType" minOccurs="0"
|
||||
maxOccurs="unbounded" />
|
||||
<xsd:element name="AllDataObjectsTimeStamp" type="XAdESTimeStampType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="IndividualDataObjectsTimeStamp" type="XAdESTimeStampType" minOccurs="0"
|
||||
maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional" />
|
||||
</xsd:complexType>
|
||||
<!-- End SignedDataObjectProperties-->
|
||||
<!-- Start UnsignedSignatureProperties-->
|
||||
<xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType" />
|
||||
<xsd:complexType name="UnsignedSignaturePropertiesType">
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="CounterSignature" type="CounterSignatureType" />
|
||||
<xsd:element name="SignatureTimeStamp" type="XAdESTimeStampType" />
|
||||
<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType" />
|
||||
<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType" />
|
||||
<xsd:element name="AttributeCertificateRefs" type="CompleteCertificateRefsType" />
|
||||
<xsd:element name="AttributeRevocationRefs" type="CompleteRevocationRefsType" />
|
||||
<xsd:element name="SigAndRefsTimeStamp" type="XAdESTimeStampType" />
|
||||
<xsd:element name="RefsOnlyTimeStamp" type="XAdESTimeStampType" />
|
||||
<xsd:element name="CertificateValues" type="CertificateValuesType" />
|
||||
<xsd:element name="RevocationValues" type="RevocationValuesType" />
|
||||
<xsd:element name="AttrAuthoritiesCertValues" type="CertificateValuesType" />
|
||||
<xsd:element name="AttributeRevocationValues" type="RevocationValuesType" />
|
||||
<xsd:element name="ArchiveTimeStamp" type="XAdESTimeStampType" />
|
||||
<xsd:any namespace="##other" />
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional" />
|
||||
</xsd:complexType>
|
||||
<!-- End UnsignedSignatureProperties-->
|
||||
<!-- Start UnsignedDataObjectProperties-->
|
||||
<xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType" />
|
||||
<xsd:complexType name="UnsignedDataObjectPropertiesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="UnsignedDataObjectProperty" type="AnyType" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional" />
|
||||
</xsd:complexType>
|
||||
<!-- End UnsignedDataObjectProperties-->
|
||||
<!-- Start QualifyingPropertiesReference-->
|
||||
<xsd:element name="QualifyingPropertiesReference" type="QualifyingPropertiesReferenceType" />
|
||||
<xsd:complexType name="QualifyingPropertiesReferenceType">
|
||||
<xsd:attribute name="URI" type="xsd:anyURI" use="required" />
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional" />
|
||||
</xsd:complexType>
|
||||
<!-- End QualifyingPropertiesReference-->
|
||||
<!-- End container types -->
|
||||
<!-- Start SigningTime element -->
|
||||
<xsd:element name="SigningTime" type="xsd:dateTime" />
|
||||
<!-- End SigningTime element -->
|
||||
<!-- Start SigningCertificate -->
|
||||
<xsd:element name="SigningCertificate" type="CertIDListType" />
|
||||
<xsd:complexType name="CertIDListType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Cert" type="CertIDType" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CertIDType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="CertDigest" type="DigestAlgAndValueType" />
|
||||
<xsd:element name="IssuerSerial" type="ds:X509IssuerSerialType" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="URI" type="xsd:anyURI" use="optional" />
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="DigestAlgAndValueType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="ds:DigestMethod" />
|
||||
<xsd:element ref="ds:DigestValue" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End SigningCertificate -->
|
||||
<!-- Start SignaturePolicyIdentifier -->
|
||||
<xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType" />
|
||||
<xsd:complexType name="SignaturePolicyIdentifierType">
|
||||
<xsd:choice>
|
||||
<xsd:element name="SignaturePolicyId" type="SignaturePolicyIdType" />
|
||||
<xsd:element name="SignaturePolicyImplied" />
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="SignaturePolicyIdType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="SigPolicyId" type="ObjectIdentifierType" />
|
||||
<xsd:element ref="ds:Transforms" minOccurs="0" />
|
||||
<xsd:element name="SigPolicyHash" type="DigestAlgAndValueType" />
|
||||
<xsd:element name="SigPolicyQualifiers" type="SigPolicyQualifiersListType" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="SigPolicyQualifiersListType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="SigPolicyQualifier" type="AnyType" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="SPURI" type="xsd:anyURI" />
|
||||
<xsd:element name="SPUserNotice" type="SPUserNoticeType" />
|
||||
<xsd:complexType name="SPUserNoticeType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="NoticeRef" type="NoticeReferenceType" minOccurs="0" />
|
||||
<xsd:element name="ExplicitText" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="NoticeReferenceType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Organization" type="xsd:string" />
|
||||
<xsd:element name="NoticeNumbers" type="IntegerListType" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="IntegerListType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="int" type="xsd:integer" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End SignaturePolicyIdentifier -->
|
||||
<!-- Start CounterSignature -->
|
||||
<xsd:element name="CounterSignature" type="CounterSignatureType" />
|
||||
<xsd:complexType name="CounterSignatureType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="ds:Signature" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End CounterSignature -->
|
||||
<!-- Start DataObjectFormat -->
|
||||
<xsd:element name="DataObjectFormat" type="DataObjectFormatType" />
|
||||
<xsd:complexType name="DataObjectFormatType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Description" type="xsd:string" minOccurs="0" />
|
||||
<xsd:element name="ObjectIdentifier" type="ObjectIdentifierType" minOccurs="0" />
|
||||
<xsd:element name="MimeType" type="xsd:string" minOccurs="0" />
|
||||
<xsd:element name="Encoding" type="xsd:anyURI" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="ObjectReference" type="xsd:anyURI" use="required" />
|
||||
</xsd:complexType>
|
||||
<!-- End DataObjectFormat -->
|
||||
<!-- Start CommitmentTypeIndication -->
|
||||
<xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType" />
|
||||
<xsd:complexType name="CommitmentTypeIndicationType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="CommitmentTypeId" type="ObjectIdentifierType" />
|
||||
<xsd:choice>
|
||||
<xsd:element name="ObjectReference" type="xsd:anyURI" maxOccurs="unbounded" />
|
||||
<xsd:element name="AllSignedDataObjects" />
|
||||
</xsd:choice>
|
||||
<xsd:element name="CommitmentTypeQualifiers" type="CommitmentTypeQualifiersListType" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CommitmentTypeQualifiersListType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="CommitmentTypeQualifier" type="AnyType" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End CommitmentTypeIndication -->
|
||||
<!-- Start SignatureProductionPlace -->
|
||||
<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType" />
|
||||
<xsd:complexType name="SignatureProductionPlaceType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="City" type="xsd:string" minOccurs="0" />
|
||||
<xsd:element name="StateOrProvince" type="xsd:string" minOccurs="0" />
|
||||
<xsd:element name="PostalCode" type="xsd:string" minOccurs="0" />
|
||||
<xsd:element name="CountryName" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End SignatureProductionPlace -->
|
||||
<!-- Start SignerRole -->
|
||||
<xsd:element name="SignerRole" type="SignerRoleType" />
|
||||
<xsd:complexType name="SignerRoleType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="ClaimedRoles" type="ClaimedRolesListType" minOccurs="0" />
|
||||
<xsd:element name="CertifiedRoles" type="CertifiedRolesListType" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ClaimedRolesListType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="ClaimedRole" type="AnyType" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CertifiedRolesListType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="CertifiedRole" type="EncapsulatedPKIDataType" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End SignerRole -->
|
||||
<xsd:element name="AllDataObjectsTimeStamp" type="XAdESTimeStampType" />
|
||||
<xsd:element name="IndividualDataObjectsTimeStamp" type="XAdESTimeStampType" />
|
||||
<xsd:element name="SignatureTimeStamp" type="XAdESTimeStampType" />
|
||||
<!-- Start CompleteCertificateRefs -->
|
||||
<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType" />
|
||||
<xsd:complexType name="CompleteCertificateRefsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="CertRefs" type="CertIDListType" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional" />
|
||||
</xsd:complexType>
|
||||
<!-- End CompleteCertificateRefs -->
|
||||
<!-- Start CompleteRevocationRefs-->
|
||||
<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType" />
|
||||
<xsd:complexType name="CompleteRevocationRefsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="CRLRefs" type="CRLRefsType" minOccurs="0" />
|
||||
<xsd:element name="OCSPRefs" type="OCSPRefsType" minOccurs="0" />
|
||||
<xsd:element name="OtherRefs" type="OtherCertStatusRefsType" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional" />
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CRLRefsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="CRLRef" type="CRLRefType" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CRLRefType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType" />
|
||||
<xsd:element name="CRLIdentifier" type="CRLIdentifierType" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CRLIdentifierType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Issuer" type="xsd:string" />
|
||||
<xsd:element name="IssueTime" type="xsd:dateTime" />
|
||||
<xsd:element name="Number" type="xsd:integer" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="URI" type="xsd:anyURI" use="optional" />
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="OCSPRefsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="OCSPRef" type="OCSPRefType" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="OCSPRefType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="OCSPIdentifier" type="OCSPIdentifierType" />
|
||||
<xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ResponderIDType">
|
||||
<xsd:choice>
|
||||
<xsd:element name="ByName" type="xsd:string" />
|
||||
<xsd:element name="ByKey" type="xsd:base64Binary" />
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="OCSPIdentifierType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="ResponderID" type="ResponderIDType" />
|
||||
<xsd:element name="ProducedAt" type="xsd:dateTime" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="URI" type="xsd:anyURI" use="optional" />
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="OtherCertStatusRefsType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="OtherRef" type="AnyType" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End CompleteRevocationRefs-->
|
||||
<xsd:element name="AttributeCertificateRefs" type="CompleteCertificateRefsType" />
|
||||
<xsd:element name="AttributeRevocationRefs" type="CompleteRevocationRefsType" />
|
||||
<xsd:element name="SigAndRefsTimeStamp" type="XAdESTimeStampType" />
|
||||
<xsd:element name="RefsOnlyTimeStamp" type="XAdESTimeStampType" />
|
||||
<!-- Start CertificateValues -->
|
||||
<xsd:element name="CertificateValues" type="CertificateValuesType" />
|
||||
<xsd:complexType name="CertificateValuesType">
|
||||
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:element name="EncapsulatedX509Certificate" type="EncapsulatedPKIDataType" />
|
||||
<xsd:element name="OtherCertificate" type="AnyType" />
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional" />
|
||||
</xsd:complexType>
|
||||
<!-- End CertificateValues -->
|
||||
<!-- Start RevocationValues-->
|
||||
<xsd:element name="RevocationValues" type="RevocationValuesType" />
|
||||
<xsd:complexType name="RevocationValuesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="CRLValues" type="CRLValuesType" minOccurs="0" />
|
||||
<xsd:element name="OCSPValues" type="OCSPValuesType" minOccurs="0" />
|
||||
<xsd:element name="OtherValues" type="OtherCertStatusValuesType" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional" />
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="CRLValuesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="EncapsulatedCRLValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="OCSPValuesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="EncapsulatedOCSPValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="OtherCertStatusValuesType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="OtherValue" type="AnyType" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<!-- End RevocationValues-->
|
||||
<xsd:element name="AttrAuthoritiesCertValues" type="CertificateValuesType" />
|
||||
<xsd:element name="AttributeRevocationValues" type="RevocationValuesType" />
|
||||
<xsd:element name="ArchiveTimeStamp" type="XAdESTimeStampType" />
|
||||
</xsd:schema>
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
<?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.
|
||||
-->
|
||||
|
||||
<!--
|
||||
Library: OASIS Universal Business Language (UBL) 2.1 OS
|
||||
http://docs.oasis-open.org/ubl/os-UBL-2.1/
|
||||
Release Date: 04 November 2013
|
||||
Module: UBL-XAdESv141-2.1.xsd
|
||||
Generated on: 2011-02-21 17:20(UTC)
|
||||
|
||||
This is a copy of http://uri.etsi.org/01903/v1.4.1/XAdESv141.xsd modified
|
||||
only to change the importing URI for the XAdES v1.3.2 schema.
|
||||
-->
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#"
|
||||
targetNamespace="http://uri.etsi.org/01903/v1.4.1#" xmlns="http://uri.etsi.org/01903/v1.4.1#"
|
||||
elementFormDefault="qualified">
|
||||
<xsd:import namespace="http://uri.etsi.org/01903/v1.3.2#" schemaLocation="UBL-XAdESv132-2.1.xsd" />
|
||||
<!-- Start CertificateValues -->
|
||||
<xsd:element name="TimeStampValidationData" type="ValidationDataType" />
|
||||
<xsd:complexType name="ValidationDataType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="xades:CertificateValues" minOccurs="0" />
|
||||
<xsd:element ref="xades:RevocationValues" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:ID" use="optional" />
|
||||
<xsd:attribute name="UR" type="xsd:anyURI" use="optional" />
|
||||
</xsd:complexType>
|
||||
<xsd:element name="ArchiveTimeStampV2" type="xades:XAdESTimeStampType" />
|
||||
</xsd:schema>
|
||||
|
|
@ -0,0 +1,332 @@
|
|||
<?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.
|
||||
-->
|
||||
|
||||
<!--
|
||||
Library: OASIS Universal Business Language (UBL) 2.1 OS
|
||||
http://docs.oasis-open.org/ubl/os-UBL-2.1/
|
||||
Release Date: 04 November 2013
|
||||
Module: UBL-xmldsig-core-schema-2.1.xsd
|
||||
Generated on: 2010-08-13 19:10(UTC)
|
||||
|
||||
This is a copy of http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd
|
||||
modified only to remove these PUBLIC and SYSTEM identifiers from the DOCTYPE:
|
||||
|
||||
PUBLIC "-//W3C//DTD XMLSchema 200102//EN"
|
||||
"http://www.w3.org/2001/XMLSchema.dtd"
|
||||
-->
|
||||
<!DOCTYPE schema
|
||||
[
|
||||
<!ATTLIST schema
|
||||
xmlns:ds CDATA #FIXED "http://www.w3.org/2000/09/xmldsig#">
|
||||
<!ENTITY dsig 'http://www.w3.org/2000/09/xmldsig#'>
|
||||
<!ENTITY % p ''>
|
||||
<!ENTITY % s ''>
|
||||
]>
|
||||
|
||||
<schema xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
|
||||
xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="http://www.w3.org/2000/09/xmldsig#"
|
||||
version="0.1" elementFormDefault="qualified">
|
||||
|
||||
<!-- Basic Types Defined for Signatures -->
|
||||
|
||||
<simpleType name="CryptoBinary">
|
||||
<restriction base="base64Binary">
|
||||
</restriction>
|
||||
</simpleType>
|
||||
|
||||
<!-- Start Signature -->
|
||||
|
||||
<element name="Signature" type="ds:SignatureType" />
|
||||
<complexType name="SignatureType">
|
||||
<sequence>
|
||||
<element ref="ds:SignedInfo" />
|
||||
<element ref="ds:SignatureValue" />
|
||||
<element ref="ds:KeyInfo" minOccurs="0" />
|
||||
<element ref="ds:Object" minOccurs="0" maxOccurs="unbounded" />
|
||||
</sequence>
|
||||
<attribute name="Id" type="ID" use="optional" />
|
||||
</complexType>
|
||||
|
||||
<element name="SignatureValue" type="ds:SignatureValueType" />
|
||||
<complexType name="SignatureValueType">
|
||||
<simpleContent>
|
||||
<extension base="base64Binary">
|
||||
<attribute name="Id" type="ID" use="optional" />
|
||||
</extension>
|
||||
</simpleContent>
|
||||
</complexType>
|
||||
|
||||
<!-- Start SignedInfo -->
|
||||
|
||||
<element name="SignedInfo" type="ds:SignedInfoType" />
|
||||
<complexType name="SignedInfoType">
|
||||
<sequence>
|
||||
<element ref="ds:CanonicalizationMethod" />
|
||||
<element ref="ds:SignatureMethod" />
|
||||
<element ref="ds:Reference" maxOccurs="unbounded" />
|
||||
</sequence>
|
||||
<attribute name="Id" type="ID" use="optional" />
|
||||
</complexType>
|
||||
|
||||
<element name="CanonicalizationMethod" type="ds:CanonicalizationMethodType" />
|
||||
<complexType name="CanonicalizationMethodType" mixed="true">
|
||||
<sequence>
|
||||
<any namespace="##any" minOccurs="0" maxOccurs="unbounded" />
|
||||
<!-- (0,unbounded) elements from (1,1) namespace -->
|
||||
</sequence>
|
||||
<attribute name="Algorithm" type="anyURI" use="required" />
|
||||
</complexType>
|
||||
|
||||
<element name="SignatureMethod" type="ds:SignatureMethodType" />
|
||||
<complexType name="SignatureMethodType" mixed="true">
|
||||
<sequence>
|
||||
<element name="HMACOutputLength" minOccurs="0" type="ds:HMACOutputLengthType" />
|
||||
<any namespace="##other" minOccurs="0" maxOccurs="unbounded" />
|
||||
<!-- (0,unbounded) elements from (1,1) external namespace -->
|
||||
</sequence>
|
||||
<attribute name="Algorithm" type="anyURI" use="required" />
|
||||
</complexType>
|
||||
|
||||
<!-- Start Reference -->
|
||||
|
||||
<element name="Reference" type="ds:ReferenceType" />
|
||||
<complexType name="ReferenceType">
|
||||
<sequence>
|
||||
<element ref="ds:Transforms" minOccurs="0" />
|
||||
<element ref="ds:DigestMethod" />
|
||||
<element ref="ds:DigestValue" />
|
||||
</sequence>
|
||||
<attribute name="Id" type="ID" use="optional" />
|
||||
<attribute name="URI" type="anyURI" use="optional" />
|
||||
<attribute name="Type" type="anyURI" use="optional" />
|
||||
</complexType>
|
||||
|
||||
<element name="Transforms" type="ds:TransformsType" />
|
||||
<complexType name="TransformsType">
|
||||
<sequence>
|
||||
<element ref="ds:Transform" maxOccurs="unbounded" />
|
||||
</sequence>
|
||||
</complexType>
|
||||
|
||||
<element name="Transform" type="ds:TransformType" />
|
||||
<complexType name="TransformType" mixed="true">
|
||||
<choice minOccurs="0" maxOccurs="unbounded">
|
||||
<any namespace="##other" processContents="lax" />
|
||||
<!-- (1,1) elements from (0,unbounded) namespaces -->
|
||||
<element name="XPath" type="string" />
|
||||
</choice>
|
||||
<attribute name="Algorithm" type="anyURI" use="required" />
|
||||
</complexType>
|
||||
|
||||
<!-- End Reference -->
|
||||
|
||||
<element name="DigestMethod" type="ds:DigestMethodType" />
|
||||
<complexType name="DigestMethodType" mixed="true">
|
||||
<sequence>
|
||||
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
|
||||
</sequence>
|
||||
<attribute name="Algorithm" type="anyURI" use="required" />
|
||||
</complexType>
|
||||
|
||||
<element name="DigestValue" type="ds:DigestValueType" />
|
||||
<simpleType name="DigestValueType">
|
||||
<restriction base="base64Binary" />
|
||||
</simpleType>
|
||||
|
||||
<!-- End SignedInfo -->
|
||||
|
||||
<!-- Start KeyInfo -->
|
||||
|
||||
<element name="KeyInfo" type="ds:KeyInfoType" />
|
||||
<complexType name="KeyInfoType" mixed="true">
|
||||
<choice maxOccurs="unbounded">
|
||||
<element ref="ds:KeyName" />
|
||||
<element ref="ds:KeyValue" />
|
||||
<element ref="ds:RetrievalMethod" />
|
||||
<element ref="ds:X509Data" />
|
||||
<element ref="ds:PGPData" />
|
||||
<element ref="ds:SPKIData" />
|
||||
<element ref="ds:MgmtData" />
|
||||
<any processContents="lax" namespace="##other" />
|
||||
<!-- (1,1) elements from (0,unbounded) namespaces -->
|
||||
</choice>
|
||||
<attribute name="Id" type="ID" use="optional" />
|
||||
</complexType>
|
||||
|
||||
<element name="KeyName" type="string" />
|
||||
<element name="MgmtData" type="string" />
|
||||
|
||||
<element name="KeyValue" type="ds:KeyValueType" />
|
||||
<complexType name="KeyValueType" mixed="true">
|
||||
<choice>
|
||||
<element ref="ds:DSAKeyValue" />
|
||||
<element ref="ds:RSAKeyValue" />
|
||||
<any namespace="##other" processContents="lax" />
|
||||
</choice>
|
||||
</complexType>
|
||||
|
||||
<element name="RetrievalMethod" type="ds:RetrievalMethodType" />
|
||||
<complexType name="RetrievalMethodType">
|
||||
<sequence>
|
||||
<element ref="ds:Transforms" minOccurs="0" />
|
||||
</sequence>
|
||||
<attribute name="URI" type="anyURI" />
|
||||
<attribute name="Type" type="anyURI" use="optional" />
|
||||
</complexType>
|
||||
|
||||
<!-- Start X509Data -->
|
||||
|
||||
<element name="X509Data" type="ds:X509DataType" />
|
||||
<complexType name="X509DataType">
|
||||
<sequence maxOccurs="unbounded">
|
||||
<choice>
|
||||
<element name="X509IssuerSerial" type="ds:X509IssuerSerialType" />
|
||||
<element name="X509SKI" type="base64Binary" />
|
||||
<element name="X509SubjectName" type="string" />
|
||||
<element name="X509Certificate" type="base64Binary" />
|
||||
<element name="X509CRL" type="base64Binary" />
|
||||
<any namespace="##other" processContents="lax" />
|
||||
</choice>
|
||||
</sequence>
|
||||
</complexType>
|
||||
|
||||
<complexType name="X509IssuerSerialType">
|
||||
<sequence>
|
||||
<element name="X509IssuerName" type="string" />
|
||||
<element name="X509SerialNumber" type="integer" />
|
||||
</sequence>
|
||||
</complexType>
|
||||
|
||||
<!-- End X509Data -->
|
||||
|
||||
<!-- Begin PGPData -->
|
||||
|
||||
<element name="PGPData" type="ds:PGPDataType" />
|
||||
<complexType name="PGPDataType">
|
||||
<choice>
|
||||
<sequence>
|
||||
<element name="PGPKeyID" type="base64Binary" />
|
||||
<element name="PGPKeyPacket" type="base64Binary" minOccurs="0" />
|
||||
<any namespace="##other" processContents="lax" minOccurs="0"
|
||||
maxOccurs="unbounded" />
|
||||
</sequence>
|
||||
<sequence>
|
||||
<element name="PGPKeyPacket" type="base64Binary" />
|
||||
<any namespace="##other" processContents="lax" minOccurs="0"
|
||||
maxOccurs="unbounded" />
|
||||
</sequence>
|
||||
</choice>
|
||||
</complexType>
|
||||
|
||||
<!-- End PGPData -->
|
||||
|
||||
<!-- Begin SPKIData -->
|
||||
|
||||
<element name="SPKIData" type="ds:SPKIDataType" />
|
||||
<complexType name="SPKIDataType">
|
||||
<sequence maxOccurs="unbounded">
|
||||
<element name="SPKISexp" type="base64Binary" />
|
||||
<any namespace="##other" processContents="lax" minOccurs="0" />
|
||||
</sequence>
|
||||
</complexType>
|
||||
|
||||
<!-- End SPKIData -->
|
||||
|
||||
<!-- End KeyInfo -->
|
||||
|
||||
<!-- Start Object (Manifest, SignatureProperty) -->
|
||||
|
||||
<element name="Object" type="ds:ObjectType" />
|
||||
<complexType name="ObjectType" mixed="true">
|
||||
<sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<any namespace="##any" processContents="lax" />
|
||||
</sequence>
|
||||
<attribute name="Id" type="ID" use="optional" />
|
||||
<attribute name="MimeType" type="string" use="optional" /> <!-- add a grep facet -->
|
||||
<attribute name="Encoding" type="anyURI" use="optional" />
|
||||
</complexType>
|
||||
|
||||
<element name="Manifest" type="ds:ManifestType" />
|
||||
<complexType name="ManifestType">
|
||||
<sequence>
|
||||
<element ref="ds:Reference" maxOccurs="unbounded" />
|
||||
</sequence>
|
||||
<attribute name="Id" type="ID" use="optional" />
|
||||
</complexType>
|
||||
|
||||
<element name="SignatureProperties" type="ds:SignaturePropertiesType" />
|
||||
<complexType name="SignaturePropertiesType">
|
||||
<sequence>
|
||||
<element ref="ds:SignatureProperty" maxOccurs="unbounded" />
|
||||
</sequence>
|
||||
<attribute name="Id" type="ID" use="optional" />
|
||||
</complexType>
|
||||
|
||||
<element name="SignatureProperty" type="ds:SignaturePropertyType" />
|
||||
<complexType name="SignaturePropertyType" mixed="true">
|
||||
<choice maxOccurs="unbounded">
|
||||
<any namespace="##other" processContents="lax" />
|
||||
<!-- (1,1) elements from (1,unbounded) namespaces -->
|
||||
</choice>
|
||||
<attribute name="Target" type="anyURI" use="required" />
|
||||
<attribute name="Id" type="ID" use="optional" />
|
||||
</complexType>
|
||||
|
||||
<!-- End Object (Manifest, SignatureProperty) -->
|
||||
|
||||
<!-- Start Algorithm Parameters -->
|
||||
|
||||
<simpleType name="HMACOutputLengthType">
|
||||
<restriction base="integer" />
|
||||
</simpleType>
|
||||
|
||||
<!-- Start KeyValue Element-types -->
|
||||
|
||||
<element name="DSAKeyValue" type="ds:DSAKeyValueType" />
|
||||
<complexType name="DSAKeyValueType">
|
||||
<sequence>
|
||||
<sequence minOccurs="0">
|
||||
<element name="P" type="ds:CryptoBinary" />
|
||||
<element name="Q" type="ds:CryptoBinary" />
|
||||
</sequence>
|
||||
<element name="G" type="ds:CryptoBinary" minOccurs="0" />
|
||||
<element name="Y" type="ds:CryptoBinary" />
|
||||
<element name="J" type="ds:CryptoBinary" minOccurs="0" />
|
||||
<sequence minOccurs="0">
|
||||
<element name="Seed" type="ds:CryptoBinary" />
|
||||
<element name="PgenCounter" type="ds:CryptoBinary" />
|
||||
</sequence>
|
||||
</sequence>
|
||||
</complexType>
|
||||
|
||||
<element name="RSAKeyValue" type="ds:RSAKeyValueType" />
|
||||
<complexType name="RSAKeyValueType">
|
||||
<sequence>
|
||||
<element name="Modulus" type="ds:CryptoBinary" />
|
||||
<element name="Exponent" type="ds:CryptoBinary" />
|
||||
</sequence>
|
||||
</complexType>
|
||||
|
||||
<!-- End KeyValue Element-types -->
|
||||
|
||||
<!-- End Signature -->
|
||||
|
||||
</schema>
|
||||
|
|
@ -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.
|
||||
-->
|
||||
<xsd:schema xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
|
||||
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
|
||||
xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns="urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2"
|
||||
targetNamespace="urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2"
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified"
|
||||
version="2.1">
|
||||
<xsd:import namespace="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
|
||||
schemaLocation="../common/UBL-CommonAggregateComponents-2.1.xsd" />
|
||||
<xsd:import namespace="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
|
||||
schemaLocation="../common/UBL-CommonBasicComponents-2.1.xsd" />
|
||||
<xsd:import namespace="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"
|
||||
schemaLocation="../common/UBL-CommonExtensionComponents-2.1.xsd" />
|
||||
<xsd:element name="CreditNote" type="CreditNoteType" />
|
||||
<xsd:complexType name="CreditNoteType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="ext:UBLExtensions" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:UBLVersionID" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:CustomizationID" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:ProfileID" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:ProfileExecutionID" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:ID" minOccurs="1" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:CopyIndicator" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:UUID" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:IssueDate" minOccurs="1" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:IssueTime" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:TaxPointDate" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:CreditNoteTypeCode" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:Note" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element ref="cbc:DocumentCurrencyCode" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:TaxCurrencyCode" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:PricingCurrencyCode" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:PaymentCurrencyCode" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:PaymentAlternativeCurrencyCode"
|
||||
minOccurs="0"
|
||||
maxOccurs="1" />
|
||||
<xsd:element ref="cbc:AccountingCostCode" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:AccountingCost" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:LineCountNumeric" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:BuyerReference" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cac:InvoicePeriod" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:DiscrepancyResponse" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:OrderReference" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cac:BillingReference" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:DespatchDocumentReference"
|
||||
minOccurs="0"
|
||||
maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:ReceiptDocumentReference"
|
||||
minOccurs="0"
|
||||
maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:ContractDocumentReference"
|
||||
minOccurs="0"
|
||||
maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:AdditionalDocumentReference"
|
||||
minOccurs="0"
|
||||
maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:StatementDocumentReference"
|
||||
minOccurs="0"
|
||||
maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:OriginatorDocumentReference"
|
||||
minOccurs="0"
|
||||
maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:Signature" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:AccountingSupplierParty" minOccurs="1" maxOccurs="1" />
|
||||
<xsd:element ref="cac:AccountingCustomerParty" minOccurs="1" maxOccurs="1" />
|
||||
<xsd:element ref="cac:PayeeParty" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cac:BuyerCustomerParty" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cac:SellerSupplierParty" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cac:TaxRepresentativeParty" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cac:Delivery" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:DeliveryTerms" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:PaymentMeans" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:PaymentTerms" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:TaxExchangeRate" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cac:PricingExchangeRate" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cac:PaymentExchangeRate" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cac:PaymentAlternativeExchangeRate"
|
||||
minOccurs="0"
|
||||
maxOccurs="1" />
|
||||
<xsd:element ref="cac:AllowanceCharge" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:TaxTotal" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:LegalMonetaryTotal" minOccurs="1" maxOccurs="1" />
|
||||
<xsd:element ref="cac:CreditNoteLine" minOccurs="1" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
<!-- ===== Copyright Notice ===== --><!--
|
||||
OASIS takes no position regarding the validity or scope of any
|
||||
intellectual property or other rights that might be claimed to pertain
|
||||
to the implementation or use of the technology described in this
|
||||
document or the extent to which any license under such rights
|
||||
might or might not be available; neither does it represent that it has
|
||||
made any effort to identify any such rights. Information on OASIS's
|
||||
procedures with respect to rights in OASIS specifications can be
|
||||
found at the OASIS website. Copies of claims of rights made
|
||||
available for publication and any assurances of licenses to be made
|
||||
available, or the result of an attempt made to obtain a general
|
||||
license or permission for the use of such proprietary rights by
|
||||
implementors or users of this specification, can be obtained from
|
||||
the OASIS Executive Director.
|
||||
|
||||
OASIS invites any interested party to bring to its attention any
|
||||
copyrights, patents or patent applications, or other proprietary
|
||||
rights which may cover technology that may be required to
|
||||
implement this specification. Please address the information to the
|
||||
OASIS Executive Director.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain
|
||||
it or assist in its implementation may be prepared, copied,
|
||||
published and distributed, in whole or in part, without restriction of
|
||||
any kind, provided that the above copyright notice and this
|
||||
paragraph are included on all such copies and derivative works.
|
||||
However, this document itself may not be modified in any way,
|
||||
such as by removing the copyright notice or references to OASIS,
|
||||
except as needed for the purpose of developing OASIS
|
||||
specifications, in which case the procedures for copyrights defined
|
||||
in the OASIS Intellectual Property Rights document must be
|
||||
followed, or as required to translate it into languages other than
|
||||
English.
|
||||
|
||||
The limited permissions granted above are perpetual and will not be
|
||||
revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on
|
||||
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
|
||||
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
|
||||
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
|
||||
PARTICULAR PURPOSE.
|
||||
-->
|
||||
|
|
@ -0,0 +1,156 @@
|
|||
<?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.
|
||||
-->
|
||||
<xsd:schema xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
|
||||
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
|
||||
xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
|
||||
targetNamespace="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified"
|
||||
version="2.1">
|
||||
<xsd:import namespace="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
|
||||
schemaLocation="../common/UBL-CommonAggregateComponents-2.1.xsd" />
|
||||
<xsd:import namespace="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
|
||||
schemaLocation="../common/UBL-CommonBasicComponents-2.1.xsd" />
|
||||
<xsd:import namespace="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"
|
||||
schemaLocation="../common/UBL-CommonExtensionComponents-2.1.xsd" />
|
||||
<xsd:element name="Invoice" type="InvoiceType" />
|
||||
<xsd:complexType name="InvoiceType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="ext:UBLExtensions" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:UBLVersionID" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:CustomizationID" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:ProfileID" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:ProfileExecutionID" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:ID" minOccurs="1" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:CopyIndicator" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:UUID" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:IssueDate" minOccurs="1" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:IssueTime" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:DueDate" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:InvoiceTypeCode" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:Note" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element ref="cbc:TaxPointDate" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:DocumentCurrencyCode" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:TaxCurrencyCode" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:PricingCurrencyCode" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:PaymentCurrencyCode" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:PaymentAlternativeCurrencyCode"
|
||||
minOccurs="0"
|
||||
maxOccurs="1" />
|
||||
<xsd:element ref="cbc:AccountingCostCode" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:AccountingCost" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:LineCountNumeric" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cbc:BuyerReference" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cac:InvoicePeriod" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:OrderReference" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cac:BillingReference" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:DespatchDocumentReference"
|
||||
minOccurs="0"
|
||||
maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:ReceiptDocumentReference"
|
||||
minOccurs="0"
|
||||
maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:StatementDocumentReference"
|
||||
minOccurs="0"
|
||||
maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:OriginatorDocumentReference"
|
||||
minOccurs="0"
|
||||
maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:ContractDocumentReference"
|
||||
minOccurs="0"
|
||||
maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:AdditionalDocumentReference"
|
||||
minOccurs="0"
|
||||
maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:ProjectReference" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:Signature" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:AccountingSupplierParty" minOccurs="1" maxOccurs="1" />
|
||||
<xsd:element ref="cac:AccountingCustomerParty" minOccurs="1" maxOccurs="1" />
|
||||
<xsd:element ref="cac:PayeeParty" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cac:BuyerCustomerParty" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cac:SellerSupplierParty" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cac:TaxRepresentativeParty" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cac:Delivery" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:DeliveryTerms" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cac:PaymentMeans" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:PaymentTerms" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:PrepaidPayment" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:AllowanceCharge" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:TaxExchangeRate" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cac:PricingExchangeRate" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cac:PaymentExchangeRate" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element ref="cac:PaymentAlternativeExchangeRate"
|
||||
minOccurs="0"
|
||||
maxOccurs="1" />
|
||||
<xsd:element ref="cac:TaxTotal" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:WithholdingTaxTotal" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element ref="cac:LegalMonetaryTotal" minOccurs="1" maxOccurs="1" />
|
||||
<xsd:element ref="cac:InvoiceLine" minOccurs="1" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
<!-- ===== Copyright Notice ===== --><!--
|
||||
OASIS takes no position regarding the validity or scope of any
|
||||
intellectual property or other rights that might be claimed to pertain
|
||||
to the implementation or use of the technology described in this
|
||||
document or the extent to which any license under such rights
|
||||
might or might not be available; neither does it represent that it has
|
||||
made any effort to identify any such rights. Information on OASIS's
|
||||
procedures with respect to rights in OASIS specifications can be
|
||||
found at the OASIS website. Copies of claims of rights made
|
||||
available for publication and any assurances of licenses to be made
|
||||
available, or the result of an attempt made to obtain a general
|
||||
license or permission for the use of such proprietary rights by
|
||||
implementors or users of this specification, can be obtained from
|
||||
the OASIS Executive Director.
|
||||
|
||||
OASIS invites any interested party to bring to its attention any
|
||||
copyrights, patents or patent applications, or other proprietary
|
||||
rights which may cover technology that may be required to
|
||||
implement this specification. Please address the information to the
|
||||
OASIS Executive Director.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain
|
||||
it or assist in its implementation may be prepared, copied,
|
||||
published and distributed, in whole or in part, without restriction of
|
||||
any kind, provided that the above copyright notice and this
|
||||
paragraph are included on all such copies and derivative works.
|
||||
However, this document itself may not be modified in any way,
|
||||
such as by removing the copyright notice or references to OASIS,
|
||||
except as needed for the purpose of developing OASIS
|
||||
specifications, in which case the procedures for copyrights defined
|
||||
in the OASIS Intellectual Property Rights document must be
|
||||
followed, or as required to translate it into languages other than
|
||||
English.
|
||||
|
||||
The limited permissions granted above are perpetual and will not be
|
||||
revoked by OASIS or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on
|
||||
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
|
||||
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
|
||||
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
|
||||
PARTICULAR PURPOSE.
|
||||
-->
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,756 @@
|
|||
<?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:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:rep="http://www.xoev.de/de/validator/varl/1 "
|
||||
xmlns:s="http://www.xoev.de/de/validator/framework/1/scenarios"
|
||||
xmlns:in="http://www.xoev.de/de/validator/framework/1/createreportinput"
|
||||
xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
|
||||
xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
exclude-result-prefixes="xs"
|
||||
version="2.0">
|
||||
|
||||
<xsl:output method="xml" indent="yes" />
|
||||
|
||||
<xsl:param name="input-document" required="yes" />
|
||||
|
||||
<xsl:variable name="custom-levels" as="element(s:customLevel)*" select="//s:customLevel" />
|
||||
|
||||
|
||||
<xsl:template match="in:createReportInput">
|
||||
|
||||
<xsl:variable name="validationStepResults" as="element(rep:validationStepResult)*">
|
||||
<xsl:apply-templates select="in:validationResultsWellformedness" />
|
||||
<xsl:apply-templates select="in:validationResultsXmlSchema" />
|
||||
<xsl:apply-templates select="in:validationResultsSchematron" />
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="report" as="document-node(element(rep:report))">
|
||||
<xsl:document>
|
||||
<rep:report>
|
||||
<xsl:attribute name="valid">
|
||||
<xsl:choose>
|
||||
<xsl:when test="s:noScenarioMatched">false</xsl:when>
|
||||
<xsl:when test="$validationStepResults[@valid = 'false']">false</xsl:when>
|
||||
<xsl:otherwise>true</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:apply-templates select="in:engine" mode="copy-to-report-ns" />
|
||||
<xsl:apply-templates select="in:timestamp" mode="copy-to-report-ns" />
|
||||
<xsl:apply-templates select="in:documentIdentification" mode="copy-to-report-ns" />
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="s:scenario">
|
||||
<rep:scenarioMatched>
|
||||
<xsl:sequence select="s:scenario" />
|
||||
<xsl:call-template name="document-data" />
|
||||
<rep:validationResult>
|
||||
<xsl:sequence select="$validationStepResults" />
|
||||
</rep:validationResult>
|
||||
</rep:scenarioMatched>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<rep:noScenarioMatched>
|
||||
|
||||
</rep:noScenarioMatched>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</rep:report>
|
||||
</xsl:document>
|
||||
</xsl:variable>
|
||||
|
||||
<rep:report varlVersion="1.0.0">
|
||||
<xsl:copy-of select="$report/rep:report/(node()|@*)" />
|
||||
<xsl:apply-templates select="$report" mode="assessment" />
|
||||
</rep:report>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<!-- Overwrite this template in customisation layer to generate a documentData element -->
|
||||
<xsl:template name="document-data" />
|
||||
|
||||
|
||||
<!-- ************************************************************************************** -->
|
||||
<!-- * * -->
|
||||
<!-- * Syntax checks (well-formedness and XML Schema * -->
|
||||
<!-- * * -->
|
||||
<!-- ************************************************************************************** -->
|
||||
|
||||
<xsl:template match="in:validationResultsWellformedness|in:validationResultsXmlSchema">
|
||||
<xsl:variable name="id" as="xs:string"
|
||||
select="if (self::inValidationResultsWellformedness) then 'val-xml' else 'val-xsd'" />
|
||||
<xsl:variable name="messages" as="element(rep:message)*">
|
||||
<xsl:apply-templates select="in:xmlSyntaxError">
|
||||
<xsl:with-param name="parent-id" select="$id" />
|
||||
</xsl:apply-templates>
|
||||
</xsl:variable>
|
||||
<!-- Skip output for implicit validation steps (i. e., wellformedness implemenation) unless there is anything to tell -->
|
||||
<xsl:if test="exists($messages) or exists(s:resource)">
|
||||
<rep:validationStepResult id="{$id}"
|
||||
valid="{if ($messages[@level = ('warning', 'error')]) then false() else true()}">
|
||||
<xsl:sequence select="s:resource" />
|
||||
<xsl:sequence select="$messages" />
|
||||
</rep:validationStepResult>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="in:xmlSyntaxError">
|
||||
<xsl:param name="parent-id" as="xs:string" required="yes" />
|
||||
<xsl:variable name="id" select="concat($parent-id, '.', count(preceding-sibling::xmlSyntaxError) + 1)" />
|
||||
<xsl:variable name="level" select="if (@severity = 'SEVERITY_WARNING') then 'warning' else 'error'" />
|
||||
<rep:message id="{$id}" level="{$level}">
|
||||
<xsl:apply-templates select="*" />
|
||||
<xsl:value-of select="in:message" />
|
||||
</rep:message>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="in:xmlSyntaxError/in:*" priority="-1" />
|
||||
|
||||
|
||||
<xsl:template match="in:xmlSyntaxError/in:rowNumber[. != '-1']">
|
||||
<xsl:attribute name="lineNumber" select="." />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="in:xmlSyntaxError/in:columnNumber[. != '-1']">
|
||||
<xsl:attribute name="columnNumber" select="." />
|
||||
</xsl:template>
|
||||
|
||||
<!-- ************************************************************************************** -->
|
||||
<!-- * * -->
|
||||
<!-- * Schematron (SVRL) * -->
|
||||
<!-- * * -->
|
||||
<!-- ************************************************************************************** -->
|
||||
|
||||
|
||||
<xsl:template match="in:validationResultsSchematron">
|
||||
<xsl:variable name="schematron-output" as="element(svrl:schematron-output)?"
|
||||
select="in:results/svrl:schematron-output" />
|
||||
<xsl:if test="empty($schematron-output)">
|
||||
<xsl:message terminate="yes">Unexpected result from schematron validation - there is no
|
||||
svrl:schematron-output element!
|
||||
</xsl:message>
|
||||
</xsl:if>
|
||||
<xsl:variable name="id" as="xs:string"
|
||||
select="concat('val-sch.',1 + count(preceding-sibling::in:validationResultsSchematron))" />
|
||||
<xsl:variable name="messages" as="element(rep:message)*">
|
||||
<xsl:apply-templates select="$schematron-output/(svrl:failed-assert|svrl:successful-report)">
|
||||
<xsl:with-param name="parent-id" select="$id" />
|
||||
</xsl:apply-templates>
|
||||
</xsl:variable>
|
||||
<rep:validationStepResult id="{$id}"
|
||||
valid="{if ($messages[@level = ('warning', 'error')]) then false() else true()}">
|
||||
<xsl:sequence select="s:resource" />
|
||||
<xsl:sequence select="$messages" />
|
||||
</rep:validationStepResult>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="svrl:failed-assert|svrl:successful-report">
|
||||
<xsl:param name="parent-id" as="xs:string" required="yes" />
|
||||
<xsl:variable name="id"
|
||||
select="concat($parent-id, '.', count(preceding-sibling::failed-assert | preceding-sibling::successful-report) + 1)" />
|
||||
<rep:message id="{$id}">
|
||||
<xsl:apply-templates select="in:location/*" />
|
||||
<xsl:attribute name="level">
|
||||
<xsl:choose>
|
||||
<xsl:when test="(@flag,@role) = ('fatal', 'error')">error</xsl:when>
|
||||
<xsl:when test="(@flag,@role) = ('warning', 'warn')">warning</xsl:when>
|
||||
<xsl:when test="(@flag,@role) = ('information', 'info')">information</xsl:when>
|
||||
<xsl:when test="@role = ('information', 'info')">warning</xsl:when>
|
||||
<xsl:otherwise>error</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:apply-templates select="@location" />
|
||||
<xsl:apply-templates select="@id" />
|
||||
<xsl:value-of select="svrl:text" />
|
||||
</rep:message>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="svrl:*/@location">
|
||||
<xsl:attribute name="xpathLocation" select="." />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="svrl:failed-assert/@id">
|
||||
<xsl:attribute name="code" select="." />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="svrl:successful-report/@id">
|
||||
<xsl:attribute name="code" select="." />
|
||||
</xsl:template>
|
||||
|
||||
<!-- ************************************************************************************** -->
|
||||
<!-- * Validation helpers * -->
|
||||
<!-- ************************************************************************************** -->
|
||||
|
||||
<!-- Identity template -->
|
||||
<xsl:template mode="copy-to-report-ns" match="@*">
|
||||
<xsl:copy />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template mode="copy-to-report-ns" match="element()" priority="5">
|
||||
<xsl:element name="rep:{local-name()}">
|
||||
<xsl:apply-templates mode="copy-to-report-ns" select="node()|@*" />
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
|
||||
<!-- ************************************************************************************** -->
|
||||
<!-- * * -->
|
||||
<!-- * Assessment * -->
|
||||
<!-- * * -->
|
||||
<!-- ************************************************************************************** -->
|
||||
|
||||
<xd:doc>
|
||||
<xd:desc>
|
||||
<xd:p>Dies ist das zentrale Template des Skripts. Angewandt auf ein
|
||||
report-Dokument ergänzt es dieses um eine Handlungsempfehlung in Form eines
|
||||
<xd:i>accept</xd:i>
|
||||
oder <xd:i>reject</xd:i> Elements.
|
||||
</xd:p>
|
||||
</xd:desc>
|
||||
</xd:doc>
|
||||
<xsl:template match="rep:report" mode="assessment">
|
||||
<rep:assessment>
|
||||
<xsl:variable name="element-name" as="xs:string">
|
||||
<xsl:choose>
|
||||
<xsl:when test="empty(s:scenario)">reject</xsl:when>
|
||||
<xsl:when test="//rep:message[rep:custom-level(.) = 'error']">reject</xsl:when>
|
||||
<xsl:otherwise>accept</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:element name="rep:{$element-name}" exclude-result-prefixes="#all">
|
||||
<xsl:call-template name="explanations" />
|
||||
</xsl:element>
|
||||
</rep:assessment>
|
||||
</xsl:template>
|
||||
|
||||
<xd:doc>
|
||||
<xd:desc>
|
||||
<xd:p>Ermittelt für eine während der Validierung ausgegebene Fehlernachricht deren
|
||||
Fehlerlevel <xd:i>(error, warning, information)</xd:i> gemäß der
|
||||
benutzerspezifischen Qualifizierung.
|
||||
</xd:p>
|
||||
<xd:p>Jede Fehlernachricht hat im Rahmen der Validierung ein solches Fehlerlevel
|
||||
erhalten (siehe Attribut <xd:i>@level</xd:i>). Im Regelfall entspricht die
|
||||
benutzerspezifische Qualifizierung unverändert diesem Level. Nutzer können jedoch im
|
||||
Rahmen der Bewertung eigene Qualifizierungen vereinbaren und in dem als Parameter
|
||||
<xd:ref name="assessment" type="parameter" />
|
||||
übergebenen
|
||||
<xd:i>assessment</xd:i>
|
||||
Element für bestimmte, anhand des Fehlercodes identifizierten Fehlermeldungen eine
|
||||
eigene Qualifizierung als <xd:i>customLevel</xd:i> festlegen.
|
||||
</xd:p>
|
||||
<xd:p>Dies kann z. B. genutzt werden, um einen <xd:i>error</xd:i>, der ansonsten zur
|
||||
Rückweisung der Nachricht führen würde, zumindest zeitweilig als
|
||||
<xd:i>warning</xd:i>
|
||||
zu qualifizieren, so dass eine entsprechende
|
||||
Dokumenteninstanz trotz einer Warnung angenommen und verarbeitet würde.
|
||||
</xd:p>
|
||||
<xd:p>Die Funktion prüft für eine Fehlernachricht, ob deren <xd:i>@code</xd:i> Attribut
|
||||
Bestandteil der für ein bestimmtes <xd:i>customLevel</xd:i> des
|
||||
<xd:ref
|
||||
name="assessment" type="parameter" />
|
||||
Parameters angegebenen Fehlercodes ist.
|
||||
Falls ja, dann gilt das jeweilige <xd:i>customLevel</xd:i>. Andernfalls wird der im
|
||||
Rahmen der Validierung ermittelte Fehlerlevel unverändert übernommen.
|
||||
</xd:p>
|
||||
</xd:desc>
|
||||
<xd:param name="message">Eine im Rahmen der Validierung ausgegebene
|
||||
Fehlernachricht
|
||||
</xd:param>
|
||||
<xd:return />
|
||||
</xd:doc>
|
||||
<xsl:function name="rep:custom-level" as="xs:string">
|
||||
<xsl:param name="message" as="element(rep:message)" />
|
||||
<xsl:variable name="cl" as="element(s:customLevel)?"
|
||||
select="$custom-levels[tokenize(., '\s+') = $message/@code]" />
|
||||
<xsl:value-of select="if ($cl) then $cl/@level else $message/@level" />
|
||||
</xsl:function>
|
||||
|
||||
<xsl:template name="explanations">
|
||||
<rep:explanation>
|
||||
<xsl:call-template name="html:html" />
|
||||
</rep:explanation>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="html:html">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" data-report-type="report">
|
||||
<xsl:call-template name="html:head" />
|
||||
<body>
|
||||
<xsl:call-template name="html:document" />
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
<xd:doc>
|
||||
<xd:desc>
|
||||
<xd:p>Generiert das <xd:i>head</xd:i> Element eines eingebetteten HTML Dokuments,
|
||||
welches den Prüf- und Bewertungsbericht visualisiert und die Handlungsempfehlung
|
||||
begründet
|
||||
</xd:p>
|
||||
</xd:desc>
|
||||
</xd:doc>
|
||||
<xsl:template name="html:head" as="element(html:head)">
|
||||
<head xmlns="http://www.w3.org/1999/xhtml">
|
||||
<title>Prüfbericht</title>
|
||||
<style>
|
||||
body{
|
||||
font-family: Calibri;
|
||||
width: 230mm;
|
||||
}
|
||||
|
||||
.metadata dt {
|
||||
float: left;
|
||||
width: 230px;
|
||||
clear: left;
|
||||
}
|
||||
|
||||
.metadata dd {
|
||||
margin-left: 250px;
|
||||
}
|
||||
|
||||
table{
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table.tbl-errors{
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
table.document{
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
table.document td {vertical-align:top;}
|
||||
|
||||
.tbl-errors td{
|
||||
border: 1px solid lightgray;
|
||||
padding: 2px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
thead{
|
||||
font-weight: bold;
|
||||
background-color: #f0f0f0;
|
||||
padding-top: 6pt;
|
||||
padding-bottom: 2pt;
|
||||
}
|
||||
|
||||
.tbl-meta td{
|
||||
padding-right: 1em;
|
||||
}
|
||||
|
||||
td.pos{
|
||||
padding-left: 3pt;
|
||||
width: 5%;
|
||||
color: gray
|
||||
}
|
||||
|
||||
td.element{
|
||||
width: 95%;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
|
||||
td.element:before{
|
||||
content: attr(title);
|
||||
color: gray;
|
||||
}
|
||||
|
||||
|
||||
div.attribute{
|
||||
display: inline;
|
||||
font-style: italic;
|
||||
color: gray;
|
||||
}
|
||||
div.attribute:before{
|
||||
content: attr(title) '=';
|
||||
}
|
||||
div.val{
|
||||
display: inline;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
td.level1{
|
||||
padding-left: 2mm;
|
||||
}
|
||||
|
||||
td.level2{
|
||||
padding-left: 5mm;
|
||||
}
|
||||
|
||||
td.level3{
|
||||
padding-left: 10mm;
|
||||
}
|
||||
|
||||
td.level4{
|
||||
padding-left: 15mm;
|
||||
}
|
||||
|
||||
td.level5{
|
||||
padding-left: 20mm;
|
||||
}
|
||||
td.level6{
|
||||
padding-left: 25mm;
|
||||
}
|
||||
|
||||
tr{
|
||||
vertical-align: bottom;
|
||||
border-bottom: 1px solid #c0c0c0;
|
||||
}
|
||||
|
||||
.error{
|
||||
color: red;
|
||||
}
|
||||
|
||||
.warning{
|
||||
}
|
||||
|
||||
p.important{
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
background-color: #e0e0e0;
|
||||
padding: 3pt;
|
||||
}
|
||||
|
||||
td.right{
|
||||
text-align: right
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="html:document" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<h1>Prüfbericht</h1>
|
||||
|
||||
<xsl:call-template name="html:document-metadata" />
|
||||
|
||||
<xsl:call-template name="html:conformance" />
|
||||
|
||||
<xsl:if test="//rep:message">
|
||||
<xsl:call-template name="html:validationresults" />
|
||||
</xsl:if>
|
||||
<xsl:call-template name="html:assessment" />
|
||||
|
||||
<!-- this is the extension -->
|
||||
<xsl:if test="$input-document instance of document-node(element())">
|
||||
<xsl:call-template name="html:contentdoc">
|
||||
<xsl:with-param name="invoice" select="$input-document" />
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:call-template name="html:epilog" />
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xd:doc>
|
||||
<xd:desc>
|
||||
<xd:p>Generiert am Beginn eines eingebetteten HTML Dokuments, welches den Prüf- und
|
||||
Bewertungsbericht visualisiert und die Handlungsempfehlung begründet, eine Übersicht
|
||||
mit Metadaten des geprüften Dokuments.
|
||||
</xd:p>
|
||||
</xd:desc>
|
||||
</xd:doc>
|
||||
<xsl:template name="html:document-metadata" as="element()+">
|
||||
<div class="metadata">
|
||||
<p class="important">
|
||||
<xsl:text>Angaben zum geprüften Dokument</xsl:text>
|
||||
</p>
|
||||
<dl>
|
||||
<dt>Referenz:</dt>
|
||||
<dd>
|
||||
<xsl:value-of select="rep:documentIdentification/rep:documentReference" />
|
||||
</dd>
|
||||
|
||||
<dt>Zeitpunkt der Prüfung:</dt>
|
||||
<dd>
|
||||
<xsl:value-of select="format-dateTime(rep:timestamp, '[D].[M].[Y] [H]:[m]:[s]')" />
|
||||
</dd>
|
||||
|
||||
<dt>Erkannter Dokumenttyp:</dt>
|
||||
<dd>
|
||||
<xsl:choose>
|
||||
<xsl:when test="rep:scenarioMatched">
|
||||
<xsl:value-of select="rep:scenarioMatched/s:scenario/s:name" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<b class="error">unbekannt</b>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</dd>
|
||||
</dl>
|
||||
<xsl:call-template name="html:documentdata" />
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="html:documentdata" />
|
||||
|
||||
<xd:doc>
|
||||
<xd:desc>
|
||||
<xd:p>Generiert am Ende eines eingebetteten HTML Dokuments, welches den Prüf- und
|
||||
Bewertungsbericht visualisiert und die Handlungsempfehlung begründet, eine Übersicht
|
||||
mit Metadaten zum Prüfmodul.
|
||||
</xd:p>
|
||||
</xd:desc>
|
||||
</xd:doc>
|
||||
<xsl:template name="html:epilog" as="element()+">
|
||||
<p class="info" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<xsl:text>Dieser Prüfbericht wurde erstellt mit </xsl:text>
|
||||
<xsl:value-of select="rep:engine/rep:name" />
|
||||
<xsl:text>.</xsl:text>
|
||||
</p>
|
||||
</xsl:template>
|
||||
|
||||
<xd:doc>
|
||||
<xd:desc>
|
||||
<xd:p>Generiert in dem eingebetetteten HTML Dokument eine Tabelle mit den während der
|
||||
Validierung ausgegebenen Daten.
|
||||
</xd:p>
|
||||
</xd:desc>
|
||||
</xd:doc>
|
||||
<xsl:template name="html:validationresults" as="element()*">
|
||||
<p>Übersicht der Validierungsergebnisse:</p>
|
||||
<table class="tbl-errors">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Prüfschritt</th>
|
||||
<th>Fehler</th>
|
||||
<th>Warnungen</th>
|
||||
<th>Informationen</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<xsl:for-each select="//rep:validationResult/rep:validationStepResult">
|
||||
<xsl:variable name="step-id" select="@id" />
|
||||
<tr>
|
||||
<td>
|
||||
<xsl:value-of select="s:resource/s:name" />
|
||||
<xsl:text> (</xsl:text>
|
||||
<xsl:value-of select="@id" />
|
||||
<xsl:text>)</xsl:text>
|
||||
</td>
|
||||
<td style="width: 30mm;">
|
||||
<xsl:value-of
|
||||
select="count(rep:message[@level eq 'error'])" />
|
||||
</td>
|
||||
<td style="width: 30mm;">
|
||||
<xsl:value-of
|
||||
select="count(rep:message[@level eq 'warning'])" />
|
||||
</td>
|
||||
<td style="width: 30mm;">
|
||||
<xsl:value-of
|
||||
select="count(rep:message[@level eq 'information'])"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>Validierungsergebnisse im Detail:</p>
|
||||
<table xmlns="http://www.w3.org/1999/xhtml" class="tbl-errors">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 30mm;">Pos</th>
|
||||
<th style="width: 25mm;">Code</th>
|
||||
<th style="width: 25mm;">Adj. Grad (Grad)</th>
|
||||
<th>Text</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<xsl:for-each select="//rep:message">
|
||||
<tr>
|
||||
<xsl:attribute name="class">
|
||||
<xsl:value-of select="rep:custom-level(.)" />
|
||||
</xsl:attribute>
|
||||
<td rowspan="2">
|
||||
<xsl:value-of select="@id" />
|
||||
</td>
|
||||
<td rowspan="2">
|
||||
<xsl:value-of select="@code" />
|
||||
</td>
|
||||
<td rowspan="2">
|
||||
<xsl:value-of select="rep:custom-level(.)" />
|
||||
<xsl:if test="not(rep:custom-level(.) eq @level)">
|
||||
<xsl:value-of select="concat(' (', @level, ')')" />
|
||||
</xsl:if>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="normalize-space(.)" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<xsl:attribute name="class">
|
||||
<xsl:value-of select="rep:custom-level(.)" />
|
||||
</xsl:attribute>
|
||||
<td>
|
||||
<xsl:if test="@xpathLocation">
|
||||
<xsl:text>Pfad: </xsl:text><xsl:value-of select="@xpathLocation" />
|
||||
</xsl:if>
|
||||
<xsl:if test="@lineNumber">
|
||||
<xsl:text> Zeile: </xsl:text><xsl:value-of select="@lineNumber" />
|
||||
</xsl:if>
|
||||
<xsl:if test="@columnNumber">
|
||||
<xsl:text> Spalte: </xsl:text><xsl:value-of select="@columnNumber" />
|
||||
</xsl:if>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</tbody>
|
||||
</table>
|
||||
</xsl:template>
|
||||
|
||||
<xd:doc>
|
||||
<xd:desc>
|
||||
<xd:p>Generiert in dem eingebetteten HTML Dokument eine Aussage zur Konformität des
|
||||
geprüften Dokuments zu den formalen Vorgaben.
|
||||
</xd:p>
|
||||
</xd:desc>
|
||||
</xd:doc>
|
||||
<xsl:template name="html:conformance">
|
||||
<xsl:variable name="e" as="xs:integer" select="count(//rep:message[@level eq 'error'])" />
|
||||
<xsl:variable name="w" as="xs:integer" select="count(//rep:message[@level eq 'warning'])" />
|
||||
<xsl:choose>
|
||||
<xsl:when test="rep:scenarioMatched">
|
||||
<p class="important" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<b>Konformitätsprüfung:</b>
|
||||
<xsl:text>Das geprüfte Dokument enthält </xsl:text>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$e + $w eq 0">
|
||||
<xsl:text>weder Fehler noch Warnungen. Es ist konform zu den formalen Vorgaben.</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="concat($e, ' Fehler / ', $w, ' Warnungen. Es ist ')" />
|
||||
<b>nicht konform</b>
|
||||
<xsl:text> zu den formalen Vorgaben.</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</p>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<p class="important" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<b>Konformitätsprüfung:</b>
|
||||
<xsl:text>Das geprüfte Dokument entspricht keinen zulässigen Dokumenttyp und ist damit </xsl:text>
|
||||
<b>nicht konform</b>
|
||||
<xsl:text> zu den formalen Vorgaben.</xsl:text>
|
||||
</p>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<xd:doc>
|
||||
<xd:desc>
|
||||
<xd:p>Generiert in dem eingebetteten HTML Dokument die Aussage zur
|
||||
Handlungsempfehlung.
|
||||
</xd:p>
|
||||
</xd:desc>
|
||||
</xd:doc>
|
||||
<xsl:template name="html:assessment" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<xsl:variable name="e1" as="xs:integer" select="count(//message[@level eq 'error'])" />
|
||||
<xsl:variable name="e2" as="xs:integer"
|
||||
select="count(//rep:message[rep:custom-level(.) eq 'error'])" />
|
||||
<xsl:choose>
|
||||
<xsl:when test="empty(rep:scenarioMatched)">
|
||||
<p class="important error">Bewertung: Es wird empfohlen das Dokument zurückzuweisen.</p>
|
||||
</xsl:when>
|
||||
<xsl:when test="$e1 eq 0 and $e2 eq 0">
|
||||
<p class="important">Bewertung: Es wird empfohlen das Dokument anzunehmen und weiter zu verarbeiten.</p>
|
||||
</xsl:when>
|
||||
<xsl:when test="$e1 gt 0 and $e2 eq 0">
|
||||
<p class="important">Bewertung: Es wird empfohlen das Dokument anzunehmen und zu verarbeiten, da die
|
||||
vorhandenen Fehler derzeit toleriert werden.
|
||||
</p>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<p class="important error">Bewertung: Es wird empfohlen das Dokument zurückzuweisen.</p>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template name="html:contentdoc">
|
||||
<xsl:param name="invoice" as="document-node(element())" />
|
||||
<p class="important">
|
||||
<xsl:text>Inhalt des Rechnungsdokuments:</xsl:text>
|
||||
</p>
|
||||
<table class="document" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<xsl:apply-templates select="$invoice/*" mode="html:contentdoc" />
|
||||
</table>
|
||||
</xsl:template>
|
||||
|
||||
<xd:doc>
|
||||
<xd:desc>
|
||||
<xd:p>Eine Element wird als eine Zeile in einer Tabelle visualisiert. Die erste Spalte
|
||||
enthält die Zeilennummer, die zweite Attribute und Text des Elements
|
||||
</xd:p>
|
||||
</xd:desc>
|
||||
</xd:doc>
|
||||
<xsl:template match="*" mode="html:contentdoc">
|
||||
<xsl:variable name="line-number" as="xs:string">
|
||||
<xsl:number select="." count="*" level="any" format="0001" />
|
||||
</xsl:variable>
|
||||
<tr class="row" xmlns="http://www.w3.org/1999/xhtml" id="{$line-number}">
|
||||
<td class="pos">
|
||||
<xsl:value-of select="$line-number" />
|
||||
</td>
|
||||
<td class="element {concat('level',count(ancestor-or-self::*))}" title="{local-name()}">
|
||||
<xsl:apply-templates select="text()" mode="html:contentdoc" />
|
||||
<xsl:apply-templates select="@*" mode="html:contentdoc" />
|
||||
</td>
|
||||
</tr>
|
||||
<xsl:apply-templates select="*" mode="html:contentdoc" />
|
||||
</xsl:template>
|
||||
|
||||
<xd:doc>
|
||||
<xd:desc>
|
||||
<xd:p>Ein Textbereich (in der Zeile des Elements)</xd:p>
|
||||
</xd:desc>
|
||||
</xd:doc>
|
||||
<xsl:template match="text()" mode="html:contentdoc">
|
||||
<div class="val" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<xsl:value-of select="." />
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="element(*, xs:base64Binary)/text()" priority="10" mode="html:contentdoc">
|
||||
<div class="val" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<xsl:text>[ … ]</xsl:text>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="@xsi:schemaLocation" mode="html:contentdoc" />
|
||||
|
||||
<xd:doc>
|
||||
<xd:desc>
|
||||
<xd:p>Ein Attributbereich (in der Zeile des Elements)</xd:p>
|
||||
</xd:desc>
|
||||
</xd:doc>
|
||||
<xsl:template match="@*" mode="html:contentdoc">
|
||||
<div class="attribute" title="{local-name(.)}" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<xsl:value-of select="." />
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
631
src/main/docker/daemon/config/resources/eRechnung/report.xsl
Normal file
631
src/main/docker/daemon/config/resources/eRechnung/report.xsl
Normal file
|
|
@ -0,0 +1,631 @@
|
|||
<?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:rep="http://www.xoev.de/de/validator/varl/1 "
|
||||
xmlns:s="http://www.xoev.de/de/validator/framework/1/scenarios"
|
||||
xmlns:in="http://www.xoev.de/de/validator/framework/1/createreportinput"
|
||||
xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
|
||||
xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
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:variable name="custom-levels" as="element(s:customLevel)*" select="//s:customLevel" />
|
||||
|
||||
|
||||
<xsl:template match="in:createReportInput">
|
||||
|
||||
<xsl:variable name="validationStepResults" as="element(rep:validationStepResult)*">
|
||||
<xsl:apply-templates select="in:validationResultsWellformedness" />
|
||||
<xsl:apply-templates select="in:validationResultsXmlSchema" />
|
||||
<xsl:apply-templates select="in:validationResultsSchematron" />
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="report" as="document-node(element(rep:report))">
|
||||
<xsl:document>
|
||||
<rep:report valid="{if ($validationStepResults[@valid = 'false']) then false() else true()}">
|
||||
<xsl:apply-templates select="in:engine" mode="copy-to-report-ns" />
|
||||
<xsl:apply-templates select="in:timestamp" mode="copy-to-report-ns" />
|
||||
<xsl:apply-templates select="in:documentIdentification" mode="copy-to-report-ns" />
|
||||
<xsl:apply-templates select="s:scenario" mode="copy-to-report-ns" />
|
||||
<xsl:call-template name="document-data" />
|
||||
|
||||
<rep:validationResult>
|
||||
<xsl:sequence select="$validationStepResults" />
|
||||
</rep:validationResult>
|
||||
</rep:report>
|
||||
</xsl:document>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="report-with-ids" as="document-node(element(rep:report))">
|
||||
<xsl:document>
|
||||
<xsl:apply-templates select="$report" mode="add-ids" />
|
||||
</xsl:document>
|
||||
</xsl:variable>
|
||||
|
||||
<rep:report varlVersion="1.0.0">
|
||||
<xsl:copy-of select="$report-with-ids/rep:report/(node()|@*)" />
|
||||
<xsl:apply-templates select="$report-with-ids" />
|
||||
</rep:report>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<!-- Overwrite in customisation layer to generate a documentData element -->
|
||||
<xsl:template name="document-data" />
|
||||
|
||||
|
||||
<!-- ************************************************************************************** -->
|
||||
<!-- * * -->
|
||||
<!-- * Syntax checks (well-formedness and XML Schema * -->
|
||||
<!-- * * -->
|
||||
<!-- ************************************************************************************** -->
|
||||
|
||||
<xsl:template match="in:validationResultsWellformedness|in:validationResultsXmlSchema">
|
||||
<xsl:variable name="messages" as="element(rep:message)*">
|
||||
<xsl:apply-templates select="in:xmlSyntaxError" />
|
||||
</xsl:variable>
|
||||
<!-- Skip output for implicit validation steps (i. e., wellformedness implemenation) unless there is anything to tell -->
|
||||
<xsl:if test="exists($messages) or exists(s:resource)">
|
||||
<rep:validationStepResult valid="{if ($messages[@level = ('warning', 'error')]) then false() else true()}">
|
||||
<xsl:apply-templates mode="copy-to-report-ns" select="s:resource" />
|
||||
<xsl:sequence select="$messages" />
|
||||
</rep:validationStepResult>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="in:xmlSyntaxError">
|
||||
<rep:message level="{if (@severity = 'SEVERITY_WARNING') then 'warning' else 'error'}">
|
||||
<xsl:apply-templates select="in:location/*" />
|
||||
<xsl:value-of select="in:message" />
|
||||
</rep:message>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="in:xmlSyntaxError/in:rowNumber">
|
||||
<xsl:attribute name="lineNumber" select="." />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="in:xmlSyntaxError/in:columnNumber">
|
||||
<xsl:attribute name="columnNumber" select="." />
|
||||
</xsl:template>
|
||||
|
||||
<!-- ************************************************************************************** -->
|
||||
<!-- * * -->
|
||||
<!-- * Schematron (SVRL) * -->
|
||||
<!-- * * -->
|
||||
<!-- ************************************************************************************** -->
|
||||
|
||||
|
||||
<xsl:template match="in:validationResultsSchematron">
|
||||
<xsl:variable name="schematron-output" as="element(svrl:schematron-output)?" select="in:results/svrl:schematron-output" />
|
||||
<xsl:if test="empty($schematron-output)">
|
||||
<xsl:message terminate="yes">Unexpected result from schematron validation - there is no svrl:schematron-output element!
|
||||
</xsl:message>
|
||||
</xsl:if>
|
||||
<xsl:variable name="messages" as="element(rep:message)*">
|
||||
<xsl:apply-templates select="$schematron-output/(svrl:failed-assert|svrl:successful-report)" />
|
||||
</xsl:variable>
|
||||
<rep:validationStepResult valid="{if ($messages[@level = ('warning', 'error')]) then false() else true()}">
|
||||
<xsl:apply-templates mode="copy-to-report-ns" select="s:resource" />
|
||||
<xsl:sequence select="$messages" />
|
||||
</rep:validationStepResult>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="svrl:failed-assert|svrl:successful-report">
|
||||
<rep:message>
|
||||
<xsl:apply-templates select="in:location/*" />
|
||||
<xsl:attribute name="level">
|
||||
<xsl:choose>
|
||||
<xsl:when test="(@flag,@role) = ('fatal', 'error')">error</xsl:when>
|
||||
<xsl:when test="(@flag,@role) = ('warning', 'warn')">warning</xsl:when>
|
||||
<xsl:when test="(@flag,@role) = ('information', 'info')">information</xsl:when>
|
||||
<xsl:when test="@role = ('information', 'info')">warning</xsl:when>
|
||||
<xsl:otherwise>error</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:apply-templates select="@location" />
|
||||
<xsl:apply-templates select="@id" />
|
||||
<xsl:value-of select="svrl:text" />
|
||||
</rep:message>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="svrl:*/@location">
|
||||
<xsl:attribute name="xpathLocation" select="." />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="svrl:failed-assert/@id">
|
||||
<xsl:attribute name="code" select="." />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="svrl:successful-report/@id">
|
||||
<xsl:attribute name="code" select="." />
|
||||
</xsl:template>
|
||||
|
||||
<!-- ************************************************************************************** -->
|
||||
<!-- * Validation helpers * -->
|
||||
<!-- ************************************************************************************** -->
|
||||
|
||||
<!-- Identity template -->
|
||||
<xsl:template mode="copy-to-report-ns" match="element()|@*">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates mode="copy-to-report-ns" select="node()|@*" />
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template mode="copy-to-report-ns" match="element()" priority="5">
|
||||
<xsl:element name="rep:{local-name()}">
|
||||
<xsl:apply-templates mode="copy-to-report-ns" select="node()|@*" />
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template mode="copy-to-report-ns" match="s:*" priority="10">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates mode="copy-to-report-ns" select="node()|@*" />
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="node()|@*" mode="add-ids">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="node()|@*" mode="add-ids" />
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="rep:validationStepResult" mode="add-ids">
|
||||
<xsl:copy>
|
||||
<xsl:attribute name="id">
|
||||
<xsl:text>step_</xsl:text>
|
||||
<xsl:number level="multiple" count="rep:validationStepResult" />
|
||||
</xsl:attribute>
|
||||
<xsl:apply-templates select="node()|@*" mode="add-ids" />
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="rep:message" mode="add-ids">
|
||||
<xsl:copy>
|
||||
<xsl:attribute name="id">
|
||||
<xsl:text>message_</xsl:text>
|
||||
<xsl:number level="multiple" count="rep:message | rep:validationStepResult" />
|
||||
</xsl:attribute>
|
||||
<xsl:apply-templates select="node()|@*" mode="add-ids" />
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<!-- ************************************************************************************** -->
|
||||
<!-- * * -->
|
||||
<!-- * Assessment (ohne HTML) * -->
|
||||
<!-- * * -->
|
||||
<!-- ************************************************************************************** -->
|
||||
|
||||
<xd:doc>
|
||||
<xd:desc>
|
||||
<xd:p>Dies ist das zentrale Template des Skripts. Angewandt auf ein
|
||||
validationReport-Dokument, und unter Nutzung des
|
||||
<xd:ref name="assessment"
|
||||
type="parameter" />
|
||||
Parameters wird eine Handlungsempfehlung in Form eines
|
||||
<xd:i>accept</xd:i>
|
||||
oder <xd:i>reject</xd:i> Elements erstellt, welches eine
|
||||
Begründung der jeweiligen Empfehlung enthalten kann.
|
||||
</xd:p>
|
||||
<xd:p>Das Template realisiert eine Funktion f:validationReport, assessment →
|
||||
suggestion
|
||||
</xd:p>
|
||||
</xd:desc>
|
||||
</xd:doc>
|
||||
<xsl:template match="rep:report">
|
||||
<xsl:variable name="element-name" select="if (//rep:message[rep:custom-level(.) = 'error']) then 'reject' else 'accept'" />
|
||||
<rep:assessment>
|
||||
<xsl:element name="rep:{$element-name}" exclude-result-prefixes="#all">
|
||||
<rep:explanation>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" data-report-type="devreport-{$element-name}">
|
||||
<xsl:call-template name="html:head" />
|
||||
<body>
|
||||
<xsl:call-template name="html:document" />
|
||||
</body>
|
||||
</html>
|
||||
</rep:explanation>
|
||||
</xsl:element>
|
||||
</rep:assessment>
|
||||
</xsl:template>
|
||||
|
||||
<xd:doc>
|
||||
<xd:desc>
|
||||
<xd:p>Ermittelt für eine während der Validierung ausgegebene Fehlernachricht deren
|
||||
Fehlerlevel <xd:i>(error, warning, information)</xd:i> gemäß der
|
||||
benutzerspezifischen Qualifizierung.
|
||||
</xd:p>
|
||||
<xd:p>Jede Fehlernachricht hat im Rahmen der Validierung ein solches Fehlerlevel
|
||||
erhalten (siehe Attribut <xd:i>@level</xd:i>). Im Regelfall entspricht die
|
||||
benutzerspezifische Qualifizierung unverändert diesem Level. Nutzer können jedoch im
|
||||
Rahmen der Bewertung eigene Qualifizierungen vereinbaren und in dem als Parameter
|
||||
<xd:ref name="assessment" type="parameter" />
|
||||
übergebenen
|
||||
<xd:i>assessment</xd:i>
|
||||
Element für bestimmte, anhand des Fehlercodes identifizierten Fehlermeldungen eine
|
||||
eigene Qualifizierung als <xd:i>customLevel</xd:i> festlegen.
|
||||
</xd:p>
|
||||
<xd:p>Dies kann z. B. genutzt werden, um einen <xd:i>error</xd:i>, der ansonsten zur
|
||||
Rückweisung der Nachricht führen würde, zumindest zeitweilig als
|
||||
<xd:i>warning</xd:i>
|
||||
zu qualifizieren, so dass eine entsprechende
|
||||
Dokumenteninstanz trotz einer Warnung angenommen und verarbeitet würde.
|
||||
</xd:p>
|
||||
<xd:p>Die Funktion prüft für eine Fehlernachricht, ob deren <xd:i>@code</xd:i> Attribut
|
||||
Bestandteil der für ein bestimmtes <xd:i>customLevel</xd:i> des
|
||||
<xd:ref
|
||||
name="assessment" type="parameter" />
|
||||
Parameters angegebenen Fehlercodes ist.
|
||||
Falls ja, dann gilt das jeweilige <xd:i>customLevel</xd:i>. Andernfalls wird der im
|
||||
Rahmen der Validierung ermittelte Fehlerlevel unverändert übernommen.
|
||||
</xd:p>
|
||||
</xd:desc>
|
||||
<xd:param name="message">Eine im Rahmen der Validierung ausgegebene
|
||||
Fehlernachricht
|
||||
</xd:param>
|
||||
<xd:return />
|
||||
</xd:doc>
|
||||
<xsl:function name="rep:custom-level">
|
||||
<xsl:param name="message" as="element(rep:message)" />
|
||||
<xsl:variable name="cl" as="element(s:customLevel)?"
|
||||
select="$custom-levels[tokenize(., '\s+') = $message/@code]" />
|
||||
<xsl:value-of select="if ($cl) then $cl/@level else $message/@level" />
|
||||
</xsl:function>
|
||||
|
||||
|
||||
<!-- ************************************************************************************** -->
|
||||
<!-- * * -->
|
||||
<!-- * HTML * -->
|
||||
<!-- * * -->
|
||||
<!-- ************************************************************************************** -->
|
||||
|
||||
<xsl:template name="html:document">
|
||||
<xsl:call-template name="html:report-header" />
|
||||
<xsl:call-template name="html:prolog" />
|
||||
<!-- TODO: documentData -->
|
||||
<xsl:call-template name="html:conformance" />
|
||||
<xsl:if test="//rep:message">
|
||||
<xsl:call-template name="html:messagetable" />
|
||||
</xsl:if>
|
||||
<xsl:call-template name="html:assessment" />
|
||||
<xsl:call-template name="html:epilog" />
|
||||
</xsl:template>
|
||||
|
||||
<xd:doc>
|
||||
<xd:desc>
|
||||
<xd:p>Generiert das <xd:i>head</xd:i> Element eines eingebetteten HTML Dokuments,
|
||||
welches den Prüf- und Bewertungsbericht visualisiert und die Handlungsempfehlung
|
||||
begründet
|
||||
</xd:p>
|
||||
</xd:desc>
|
||||
</xd:doc>
|
||||
<xsl:template name="html:head" as="element(html:head)">
|
||||
<head xmlns="http://www.w3.org/1999/xhtml">
|
||||
<title>Pruefbericht der KoSIT</title>
|
||||
<style>
|
||||
body{
|
||||
font-family: Calibri;
|
||||
width: 230mm;
|
||||
}
|
||||
|
||||
table{
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table.tbl-errors{
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
.tbl-errors td{
|
||||
border: 1px solid lightgray;
|
||||
padding: 2px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
thead{
|
||||
font-weight: bold;
|
||||
background-color: #f0f0f0;
|
||||
padding-top: 6pt;
|
||||
padding-bottom: 2pt;
|
||||
}
|
||||
|
||||
.tbl-meta td{
|
||||
padding-right: 1em;
|
||||
}
|
||||
|
||||
|
||||
tr{
|
||||
vertical-align: bottom;
|
||||
border-bottom: 1px solid #c0c0c0;
|
||||
}
|
||||
|
||||
tr.error{
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
|
||||
tr.warning{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
tr.pos{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
p.important{
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
background-color: #e0e0e0;
|
||||
padding: 3pt;
|
||||
}
|
||||
|
||||
td.right{
|
||||
text-align: right
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
</xsl:template>
|
||||
|
||||
<xd:doc>
|
||||
<xd:desc>
|
||||
<xd:p>Generiert die Überschrift des eines eingebetteten HTML Dokuments, welches den
|
||||
Prüf- und Bewertungsbericht visualisiert und die Handlungsempfehlung
|
||||
begründet
|
||||
</xd:p>
|
||||
</xd:desc>
|
||||
</xd:doc>
|
||||
<xsl:template name="html:report-header" as="element()+">
|
||||
<h1 xmlns="http://www.w3.org/1999/xhtml">Prüfbericht der KoSIT</h1>
|
||||
</xsl:template>
|
||||
|
||||
<xd:doc>
|
||||
<xd:desc>
|
||||
<xd:p>Generiert am Beginn eines eingebetteten HTML Dokuments, welches den Prüf- und
|
||||
Bewertungsbericht visualisiert und die Handlungsempfehlung begründet, eine Übersicht
|
||||
mit Metadaten des geprüften Dokuments.
|
||||
</xd:p>
|
||||
</xd:desc>
|
||||
</xd:doc>
|
||||
<xsl:template name="html:prolog" as="element()+">
|
||||
<h2 xmlns="http://www.w3.org/1999/xhtml">
|
||||
<xsl:text>Angaben zum geprüften Dokument</xsl:text>
|
||||
</h2>
|
||||
<table class="tbl-meta" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<xsl:if test="/*/@id">
|
||||
<tr>
|
||||
<td colspan="2">Prüfbericht Nr.</td>
|
||||
<td colspan="3">
|
||||
<xsl:value-of select="/*/@id" />
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<tr>
|
||||
<td colspan="2">Dokument:</td>
|
||||
<td colspan="3">
|
||||
<xsl:value-of select="rep:documentIdentification/rep:documentReference" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">Szenario:</td>
|
||||
<td colspan="3">
|
||||
<xsl:value-of select="s:scenario/@name" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">Zeitpunkt:</td>
|
||||
<td colspan="3">
|
||||
<xsl:value-of select="format-dateTime(rep:timestamp, '[D].[M].[Y] [H]:[m]:[s]')"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">Validierungsschritte:</td>
|
||||
<td>Fehler</td>
|
||||
<td>Warnung</td>
|
||||
<td>Information</td>
|
||||
</tr>
|
||||
<xsl:for-each select="/rep:validationResults/rep:validationStepResult">
|
||||
<xsl:variable name="step-id" select="@id" />
|
||||
<tr>
|
||||
<td>
|
||||
<xsl:value-of select="@id" />
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="s:resource/s:resouceName" />
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of
|
||||
select="count(//rep:message[@step eq $step-id and @level eq 'error'])" />
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of
|
||||
select="count(//rep:message[@step eq $step-id and @level eq 'warning'])" />
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of
|
||||
select="count(//rep:message[@step eq $step-id and @level eq 'information'])"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</xsl:template>
|
||||
|
||||
<xd:doc>
|
||||
<xd:desc>
|
||||
<xd:p>Generiert am Ende eines eingebetteten HTML Dokuments, welches den Prüf- und
|
||||
Bewertungsbericht visualisiert und die Handlungsempfehlung begründet, eine Übersicht
|
||||
mit Metadaten zum Prüfmodul.
|
||||
</xd:p>
|
||||
</xd:desc>
|
||||
</xd:doc>
|
||||
<xsl:template name="html:epilog" as="element()+">
|
||||
<p class="info" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<xsl:text>Erstellt mit: </xsl:text>
|
||||
<xsl:value-of select="rep:engine/rep:name" />
|
||||
<xsl:text> für das InstructionSet </xsl:text>
|
||||
<em>
|
||||
<xsl:value-of select="rep:engine/rep:info[@key eq 'title']" />
|
||||
</em>
|
||||
<xsl:text> vom </xsl:text>
|
||||
<xsl:value-of
|
||||
select="format-dateTime(xs:dateTime(rep:engine/rep:info[@key eq 'version']), '[D].[M].[Y]')" />
|
||||
<xsl:text>.</xsl:text>
|
||||
</p>
|
||||
</xsl:template>
|
||||
|
||||
<xd:doc>
|
||||
<xd:desc>
|
||||
<xd:p>Generiert in dem eingebetetteten HTML Dokument eine Tabelle mit den während der
|
||||
Validierung ausgegebenen Daten.
|
||||
</xd:p>
|
||||
</xd:desc>
|
||||
</xd:doc>
|
||||
<xsl:template name="html:messagetable" as="element()">
|
||||
<table xmlns="http://www.w3.org/1999/xhtml" class="tbl-errors">
|
||||
<xsl:call-template name="html:messagetable.head" />
|
||||
<tbody>
|
||||
<xsl:for-each select="//rep:message">
|
||||
<xsl:call-template name="html:messagetable.row" />
|
||||
</xsl:for-each>
|
||||
</tbody>
|
||||
</table>
|
||||
</xsl:template>
|
||||
|
||||
<xd:doc>
|
||||
<xd:desc>
|
||||
<xd:p>Generiert in der HTML-Tabelle der Validierungsnachtichten in dem eingebetteten
|
||||
HTML Dokument dn Tabellenkopf
|
||||
</xd:p>
|
||||
</xd:desc>
|
||||
</xd:doc>
|
||||
<xsl:template name="html:messagetable.head" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Pos</th>
|
||||
<th>Code</th>
|
||||
<th>CustomLevel (Level)</th>
|
||||
<th>Step</th>
|
||||
<th>Text</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</xsl:template>
|
||||
|
||||
<xd:doc>
|
||||
<xd:desc>
|
||||
<xd:p>Generiert in der HTML-Tabelle der Validierungsnachtichten in dem eingebetteten
|
||||
HTML Dokument eine oder mehrere Zeilen pro Validierungsnachricht
|
||||
</xd:p>
|
||||
</xd:desc>
|
||||
</xd:doc>
|
||||
<xsl:template name="html:messagetable.row" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<tr>
|
||||
<xsl:attribute name="class">
|
||||
<xsl:value-of select="rep:custom-level(.)" />
|
||||
</xsl:attribute>
|
||||
<td>
|
||||
<xsl:value-of select="position()" />
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="@code" />
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="rep:custom-level(.)" />
|
||||
<xsl:if test="not(rep:custom-level(.) eq @level)">
|
||||
<xsl:value-of select="concat(' (', @level, ')')" />
|
||||
</xsl:if>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="@step" />
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="normalize-space(.)" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" />
|
||||
<td>
|
||||
<xsl:value-of select="@location" />
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:template>
|
||||
|
||||
<xd:doc>
|
||||
<xd:desc>
|
||||
<xd:p>Generiert in dem eingebetteten HTML Dokument eine Aussage zur Konformität des
|
||||
geprüften Dokuments zu den formalen Vorgaben.
|
||||
</xd:p>
|
||||
</xd:desc>
|
||||
</xd:doc>
|
||||
<xsl:template name="html:conformance">
|
||||
<xsl:variable name="e" as="xs:integer" select="count(//rep:message[@level eq 'error'])" />
|
||||
<xsl:variable name="w" as="xs:integer" select="count(//rep:message[@level eq 'warning'])" />
|
||||
<p class="important" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<b>Konformitätsprüfung:</b>
|
||||
<xsl:text>Das geprüfte Dokument enthält </xsl:text>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$e + $w eq 0">
|
||||
<xsl:text>weder Fehler noch Warnungen. Es ist konform zu den formalen Vorgaben.</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="concat($e, ' Fehler / ', $w, ' Warnungen. Es ist ')" />
|
||||
<b>nicht konform</b>
|
||||
<xsl:text> zu den formalen Vorgaben.</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</p>
|
||||
</xsl:template>
|
||||
|
||||
<xd:doc>
|
||||
<xd:desc>
|
||||
<xd:p>Generiert in dem eingebetteten HTML Dokument die Aussage zur
|
||||
Handlungsempfehlung.
|
||||
</xd:p>
|
||||
</xd:desc>
|
||||
</xd:doc>
|
||||
<xsl:template name="html:assessment">
|
||||
<xsl:variable name="e1" as="xs:integer" select="count(//message[@level eq 'error'])" />
|
||||
<xsl:variable name="e2" as="xs:integer"
|
||||
select="count(//rep:message[rep:custom-level(.) eq 'error'])" />
|
||||
<p class="important" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<b>Bewertung:</b>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$e1 eq 0 and $e2 eq 0">
|
||||
<xsl:text>Es wird empfohlen das Dokument anzunehmen un weiter zu verarbeiten.</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$e1 gt 0 and $e2 eq 0">
|
||||
<xsl:text>Es wird empfohlen das Dokument anzunehmen und zu verarbeiten, da die vorhandenen Fehler derzeit toleriert werden.</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>Es wird empfohlen das Dokument zurückzuweisen.</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</p>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
68
src/main/docker/daemon/config/scenarios.xml
Normal file
68
src/main/docker/daemon/config/scenarios.xml
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
<?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.1">
|
||||
<name>XInneres</name>
|
||||
<date>2017-08-08</date>
|
||||
<description>
|
||||
<p>Prüft XInneres Nachrichten anhand der von uns offiziell herausgegebenen XML Schemata und Beispielen für mögliche weitergehende
|
||||
Prüfungen mit Schematron.
|
||||
</p>
|
||||
<p>Prüft elektronische Rechnungen im Format UBL 2.1</p>
|
||||
</description>
|
||||
|
||||
<scenario>
|
||||
<name>UBL 2.1 Invoice</name>
|
||||
<namespace prefix="invoice">urn:oasis:names:specification:ubl:schema:xsd:Invoice-2</namespace>
|
||||
<match>/invoice:Invoice</match>
|
||||
|
||||
<validateWithXmlSchema>
|
||||
<resource>
|
||||
<name>UBL 2.1 Invoice</name>
|
||||
<location>resources/eRechnung/UBL-2.1/xsdrt/maindoc/UBL-Invoice-2.1.xsd</location>
|
||||
</resource>
|
||||
</validateWithXmlSchema>
|
||||
<validateWithSchematron>
|
||||
<resource>
|
||||
<name>BII Rules for Invoice</name>
|
||||
<location>resources/eRechnung/UBL-2.1/xsl/BIIRULES-UBL-T10.xsl</location>
|
||||
</resource>
|
||||
</validateWithSchematron>
|
||||
<validateWithSchematron>
|
||||
<resource>
|
||||
<name>openPEPPOL Rules for Invoice</name>
|
||||
<location>resources/eRechnung/UBL-2.1/xsl/OPENPEPPOL-UBL-T10.xsl</location>
|
||||
</resource>
|
||||
</validateWithSchematron>
|
||||
<createReport>
|
||||
<resource>
|
||||
<name>Report für eRechnung</name>
|
||||
<location>resources/eRechnung/report.xsl</location>
|
||||
</resource>
|
||||
</createReport>
|
||||
</scenario>
|
||||
<noScenarioReport>
|
||||
<resource>
|
||||
<name>default</name>
|
||||
<location>resources/eRechnung/default-report.xsl</location>
|
||||
</resource>
|
||||
</noScenarioReport>
|
||||
|
||||
</scenarios>
|
||||
3
src/main/docker/daemon/run.sh
Normal file
3
src/main/docker/daemon/run.sh
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cd /opt/validationtool && java -jar validationtool-standalone.jar -s scenarios.xml -D
|
||||
|
|
@ -19,10 +19,7 @@
|
|||
|
||||
package de.kosit.validationtool.api;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* Eine Datei in eingelesener Form.
|
||||
|
|
|
|||
|
|
@ -20,12 +20,12 @@
|
|||
package de.kosit.validationtool.cmd;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URI;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -37,6 +37,7 @@ import org.apache.commons.cli.HelpFormatter;
|
|||
import org.apache.commons.cli.Option;
|
||||
import org.apache.commons.cli.Options;
|
||||
import org.apache.commons.cli.ParseException;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -56,14 +57,15 @@ import de.kosit.validationtool.impl.ObjectFactory;
|
|||
@Slf4j
|
||||
public class CommandLineApplication {
|
||||
|
||||
|
||||
private static final Option HELP = Option.builder("?").longOpt("help").argName("Help").desc("Displays this help").build();
|
||||
|
||||
|
||||
private static final Option SCENARIOS = Option.builder("s").required().longOpt("scenarios").hasArg()
|
||||
.desc("Location of scenarios.xml e.g.").build();
|
||||
|
||||
private static final Option REPOSITORY = Option.builder("r").longOpt("repository").hasArg()
|
||||
.desc("Directory containing scenario content").build();
|
||||
|
||||
private static final Option PRINT = Option.builder("p").longOpt("print").desc("Prints the check result to stdout").build();
|
||||
|
||||
private static final Option OUTPUT = Option.builder("o").longOpt("output-directory")
|
||||
|
|
@ -76,6 +78,17 @@ public class CommandLineApplication {
|
|||
|
||||
private static final Option CHECK_ASSERTIONS = Option.builder("c").longOpt("check-assertions").hasArg()
|
||||
.desc("Check the result using defined assertions").argName("assertions-file").build();
|
||||
private static final Option SERVER = Option.builder("D").longOpt("daemon").desc("Starts a daemon listing for validation requests").build();
|
||||
|
||||
private static final Option HOST = Option.builder("H").longOpt("host").hasArg()
|
||||
.desc("The hostname / IP address to bind the daemon. Default is localhost").build();
|
||||
|
||||
private static final Option PORT = Option.builder("P").longOpt("port").hasArg()
|
||||
.desc("The port to bind the daemon. Default is 8080").build();
|
||||
|
||||
private static final Option WORKER_COUNT = Option.builder("T").longOpt("threads").hasArg().desc("Number of threads processing validation requests").build();
|
||||
public static final int DAEMON_SIGNAL = 100;
|
||||
|
||||
|
||||
private static final Option PRINT_MEM_STATS = Option.builder("m").longOpt("memory-stats").desc("Prints some memory stats").build();
|
||||
|
||||
|
|
@ -90,15 +103,19 @@ public class CommandLineApplication {
|
|||
*/
|
||||
public static void main(String[] args) {
|
||||
final int resultStatus = mainProgram(args);
|
||||
System.exit(resultStatus);
|
||||
if (DAEMON_SIGNAL != resultStatus) {
|
||||
System.exit(resultStatus);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Hauptprogramm für die Kommandozeilen-Applikation.
|
||||
*
|
||||
* @param args die Eingabe-Argumente
|
||||
*/
|
||||
static int mainProgram(String[] args) {
|
||||
int returnValue = 0;
|
||||
Options options = createOptions();
|
||||
if (isHelpRequested(args)) {
|
||||
printHelp(options);
|
||||
|
|
@ -106,10 +123,12 @@ public class CommandLineApplication {
|
|||
try {
|
||||
CommandLineParser parser = new DefaultParser();
|
||||
final CommandLine cmd = parser.parse(options, args);
|
||||
if (cmd.getArgList().isEmpty()) {
|
||||
if (cmd.hasOption(SERVER.getOpt())) {
|
||||
returnValue = startDaemonMode(cmd);
|
||||
} else if (cmd.getArgList().isEmpty()) {
|
||||
printHelp(createOptions());
|
||||
} else {
|
||||
return processActions(cmd);
|
||||
returnValue = processActions(cmd);
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
log.error("Error processing command line arguments: " + e.getMessage());
|
||||
|
|
@ -119,6 +138,46 @@ public class CommandLineApplication {
|
|||
return 0;
|
||||
}
|
||||
|
||||
private static int determinePort(CommandLine cmd) {
|
||||
int port = 8080;
|
||||
if (checkOptionWithValue(PORT, cmd)) {
|
||||
port = Integer.parseInt(cmd.getOptionValue(PORT.getOpt()));
|
||||
}
|
||||
return port;
|
||||
}
|
||||
|
||||
private static int determineThreads(CommandLine cmd) {
|
||||
int threads = Runtime.getRuntime().availableProcessors();
|
||||
if (checkOptionWithValue(WORKER_COUNT, cmd)) {
|
||||
threads = Integer.parseInt(cmd.getOptionValue(WORKER_COUNT.getOpt()));
|
||||
}
|
||||
return threads;
|
||||
}
|
||||
|
||||
private static String determineHost(CommandLine cmd) {
|
||||
String host = "localhost";
|
||||
if (checkOptionWithValue(HOST, cmd)) {
|
||||
host = cmd.getOptionValue(HOST.getOpt());
|
||||
}
|
||||
return host;
|
||||
}
|
||||
|
||||
private static int startDaemonMode(CommandLine cmd) {
|
||||
Option[] unavailable = new Option[]{PRINT, CHECK_ASSERTIONS, DEBUG, OUTPUT, EXTRACT_HTML};
|
||||
warnUnusedOptions(cmd, unavailable, true);
|
||||
Daemon validDaemon = new Daemon(determineDefinition(cmd), determineRepository(cmd), determineHost(cmd), determinePort(cmd), determineThreads(cmd));
|
||||
validDaemon.startServer();
|
||||
return DAEMON_SIGNAL;
|
||||
}
|
||||
|
||||
private static void warnUnusedOptions(CommandLine cmd, Option[] unavailable, boolean daemon) {
|
||||
Arrays.stream(cmd.getOptions()).filter(o -> ArrayUtils.contains(unavailable, o)).map(o -> "The option " + o.getLongOpt() + " is not available in daemon mode").forEach(log::error);
|
||||
if (daemon && !cmd.getArgList().isEmpty()) {
|
||||
log.info("Ignoring test targets in daemon mode");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static boolean isHelpRequested(String[] args) {
|
||||
Options helpOptions = createHelpOptions();
|
||||
try {
|
||||
|
|
@ -137,6 +196,8 @@ public class CommandLineApplication {
|
|||
try {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
Option[] unavailable = new Option[]{HOST, PORT, WORKER_COUNT};
|
||||
warnUnusedOptions(cmd, unavailable, false);
|
||||
CheckConfiguration d = new CheckConfiguration(determineDefinition(cmd));
|
||||
d.setScenarioRepository(determineRepository(cmd));
|
||||
InternalCheck check = new InternalCheck(d);
|
||||
|
|
@ -149,6 +210,7 @@ public class CommandLineApplication {
|
|||
if (cmd.hasOption(PRINT.getOpt())) {
|
||||
check.getCheckSteps().add(new PrintReportAction());
|
||||
}
|
||||
|
||||
if (cmd.hasOption(CHECK_ASSERTIONS.getOpt())) {
|
||||
Assertions assertions = loadAssertions(cmd.getOptionValue(CHECK_ASSERTIONS.getOpt()));
|
||||
check.getCheckSteps().add(new CheckAssertionAction(assertions, ObjectFactory.createProcessor()));
|
||||
|
|
@ -236,7 +298,7 @@ public class CommandLineApplication {
|
|||
|
||||
}
|
||||
|
||||
private static URI determineRepository(CommandLine cmd) throws MalformedURLException {
|
||||
private static URI determineRepository(CommandLine cmd) {
|
||||
if (checkOptionWithValue(REPOSITORY, cmd)) {
|
||||
Path d = Paths.get(cmd.getOptionValue(REPOSITORY.getOpt()));
|
||||
if (Files.isDirectory(d)) {
|
||||
|
|
@ -249,7 +311,7 @@ public class CommandLineApplication {
|
|||
return null;
|
||||
}
|
||||
|
||||
private static URI determineDefinition(CommandLine cmd) throws MalformedURLException {
|
||||
private static URI determineDefinition(CommandLine cmd) {
|
||||
checkOptionWithValue(SCENARIOS, cmd);
|
||||
Path f = Paths.get(cmd.getOptionValue(SCENARIOS.getOpt()));
|
||||
if (Files.isRegularFile(f)) {
|
||||
|
|
@ -291,6 +353,9 @@ public class CommandLineApplication {
|
|||
private static Options createOptions() {
|
||||
Options options = new Options();
|
||||
options.addOption(HELP);
|
||||
options.addOption(SERVER);
|
||||
options.addOption(HOST);
|
||||
options.addOption(PORT);
|
||||
options.addOption(SCENARIOS);
|
||||
options.addOption(REPOSITORY);
|
||||
options.addOption(PRINT);
|
||||
|
|
@ -299,6 +364,7 @@ public class CommandLineApplication {
|
|||
options.addOption(DEBUG);
|
||||
options.addOption(CHECK_ASSERTIONS);
|
||||
options.addOption(PRINT_MEM_STATS);
|
||||
options.addOption(WORKER_COUNT);
|
||||
return options;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
197
src/main/java/de/kosit/validationtool/cmd/Daemon.java
Normal file
197
src/main/java/de/kosit/validationtool/cmd/Daemon.java
Normal file
|
|
@ -0,0 +1,197 @@
|
|||
package de.kosit.validationtool.cmd;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.URI;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import javax.xml.transform.Transformer;
|
||||
import javax.xml.transform.TransformerException;
|
||||
import javax.xml.transform.dom.DOMSource;
|
||||
import javax.xml.transform.stream.StreamResult;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
|
||||
import com.sun.net.httpserver.HttpExchange;
|
||||
import com.sun.net.httpserver.HttpHandler;
|
||||
import com.sun.net.httpserver.HttpServer;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import de.kosit.validationtool.api.Check;
|
||||
import de.kosit.validationtool.api.CheckConfiguration;
|
||||
import de.kosit.validationtool.api.Input;
|
||||
import de.kosit.validationtool.api.InputFactory;
|
||||
import de.kosit.validationtool.impl.DefaultCheck;
|
||||
import de.kosit.validationtool.impl.ObjectFactory;
|
||||
import de.kosit.validationtool.model.scenarios.Scenarios;
|
||||
|
||||
/**
|
||||
* HTTP-Daemon für die Bereitstellung der Prüf-Funktionalität via http.
|
||||
*
|
||||
* @author Roula Antoun
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Setter
|
||||
@Getter
|
||||
@Slf4j
|
||||
class Daemon {
|
||||
|
||||
/**
|
||||
* Wir benötigen einen Handler, der zur Verarbeitung von HTTP-Anforderungen aufgerufen wird um hier die Verarbeitung des
|
||||
* POST Request zu realisieren.
|
||||
*/
|
||||
@Slf4j
|
||||
private static class HttpServerHandler implements HttpHandler {
|
||||
|
||||
private static final AtomicLong counter = new AtomicLong(0);
|
||||
|
||||
private final Check implemenation;
|
||||
|
||||
HttpServerHandler(Check check) {
|
||||
this.implemenation = check;
|
||||
}
|
||||
|
||||
/**
|
||||
* Methode, die eine gegebene Anforderung verarbeitet und eine entsprechende Antwort generiert
|
||||
*
|
||||
* @param httpExchange kapselt eine empfangene HTTP-Anforderung und eine Antwort, die in einem Exchange generiert werden
|
||||
* soll.
|
||||
*/
|
||||
@Override
|
||||
public void handle(HttpExchange httpExchange) throws IOException {
|
||||
try {
|
||||
String requestMethod = httpExchange.getRequestMethod();
|
||||
if (requestMethod.equals("POST")) {
|
||||
InputStream inputStream = httpExchange.getRequestBody();
|
||||
Input serverInput = InputFactory.read(inputStream, "Prüfling" + counter.incrementAndGet());
|
||||
|
||||
int contentLength = serverInput.getContent().length;
|
||||
if (contentLength != 0) {
|
||||
writeOutputstreamArray(httpExchange, implemenation.check(serverInput));
|
||||
} else {
|
||||
writeError(httpExchange, 400, "XML-Inhalt erforderlich!");
|
||||
}
|
||||
} else {
|
||||
writeError(httpExchange, 405, "Es ist nur die POST-Methode erlaubt!");
|
||||
}
|
||||
} catch (TransformerException e) {
|
||||
writeError(httpExchange, 500, "Interner Fehler bei der Verarbeitung des Requests: " + e.getMessage());
|
||||
log.error("Es ist ein Fehler aufgetreten. Das Dokument kann nicht geprüft werden", e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Wir benötigen einen Handler, der zur Verarbeitung von HTTP-Anforderungen aufgerufen wird , und hier für Verarbeitung
|
||||
* das GET Request um Health-Endpunkt zu erstellen. Die Klasse HealthHandler implementiert diese Schnittstelle
|
||||
*/
|
||||
@Slf4j
|
||||
static class HealthHandler implements HttpHandler {
|
||||
|
||||
private final Scenarios scenarios;
|
||||
|
||||
HealthHandler(Scenarios scenarios) {
|
||||
this.scenarios = scenarios;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handle(HttpExchange httpExchange) throws IOException {
|
||||
Health health = new Health(scenarios);
|
||||
Document doc = health.writeHealthXml();
|
||||
try {
|
||||
writeOutputstreamArray(httpExchange, doc);
|
||||
} catch (TransformerException e) {
|
||||
writeError(httpExchange, 500, e.getMessage());
|
||||
log.error("Fehler beim Erzeugen der Status-Information", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private final URI scenarioDefinition;
|
||||
|
||||
private final URI repository;
|
||||
|
||||
private final String hostName;
|
||||
|
||||
private final int port;
|
||||
|
||||
private final int threadCount;
|
||||
|
||||
/**
|
||||
* Methode, die die Antwort als String-Text schreibt
|
||||
*
|
||||
* @param httpExchange um den Antwort Body zu erhalten
|
||||
* @param rCode der Code-Status
|
||||
* @param response die String antwort, die ich anzeigen möchte
|
||||
*/
|
||||
private static void writeError(HttpExchange httpExchange, int rCode, String response) throws IOException {
|
||||
httpExchange.sendResponseHeaders(rCode, response.length());
|
||||
OutputStream os = httpExchange.getResponseBody();
|
||||
os.write(response.getBytes());
|
||||
os.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Methode, die die Antwort als String-Text schreibt
|
||||
*
|
||||
* @param httpExchange um den Antwort Body zu erhalten
|
||||
* @param doc der Report
|
||||
*/
|
||||
private static void writeOutputstreamArray(HttpExchange httpExchange, Document doc) throws IOException, TransformerException {
|
||||
final byte[] bytes = serialize(doc);
|
||||
OutputStream os = httpExchange.getResponseBody();
|
||||
httpExchange.getResponseHeaders().add("Content-Type", "application/xml");
|
||||
httpExchange.sendResponseHeaders(200, bytes.length);
|
||||
os.write(bytes);
|
||||
os.close();
|
||||
log.debug("Xml File erzeugen ist Fertig ");
|
||||
}
|
||||
|
||||
/**
|
||||
* Methode zum Serialisieren des Dokuments.
|
||||
*
|
||||
* @param report Vom Typ Dokument, aka Report .
|
||||
*/
|
||||
private static byte[] serialize(Document report) throws TransformerException {
|
||||
|
||||
try ( ByteArrayOutputStream bArrayOS = new ByteArrayOutputStream() ) {
|
||||
DOMSource source = new DOMSource(report);
|
||||
StreamResult streamResult = new StreamResult(bArrayOS);
|
||||
Transformer transformer = ObjectFactory.createTransformer(true);
|
||||
transformer.transform(source, streamResult);
|
||||
return bArrayOS.toByteArray();
|
||||
} catch (IOException e) {
|
||||
log.error("Report {}", e.getMessage(), e);
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Methode zum Starten des Servers
|
||||
*/
|
||||
void startServer() {
|
||||
CheckConfiguration config = new CheckConfiguration(scenarioDefinition);
|
||||
config.setScenarioRepository(repository);
|
||||
HttpServer server = null;
|
||||
try {
|
||||
server = HttpServer.create(new InetSocketAddress(hostName, port), 0);
|
||||
DefaultCheck check = new DefaultCheck(config);
|
||||
server.createContext("/", new HttpServerHandler(check));
|
||||
server.createContext("/health", new HealthHandler(check.getRepository().getScenarios()));
|
||||
server.setExecutor(Executors.newFixedThreadPool(threadCount));
|
||||
server.start();
|
||||
log.info("Server ist erfolgreich gestartet");
|
||||
} catch (IOException e) {
|
||||
log.error("Fehler beim HttpServer erstellen!", e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
117
src/main/java/de/kosit/validationtool/cmd/Health.java
Normal file
117
src/main/java/de/kosit/validationtool/cmd/Health.java
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
package de.kosit.validationtool.cmd;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import de.kosit.validationtool.model.scenarios.Scenarios;
|
||||
|
||||
/**
|
||||
* Klasse zur Erzeugung Health Xml , die optiamle Status.
|
||||
*
|
||||
* @author Roula Antoun
|
||||
*/
|
||||
@Slf4j
|
||||
class Health {
|
||||
|
||||
private final long freeMemory;
|
||||
|
||||
private final long maxMemory;
|
||||
|
||||
private final long totalMemory;
|
||||
|
||||
private final Scenarios scenarios;
|
||||
|
||||
Health(Scenarios scenarios) {
|
||||
|
||||
Runtime runtime = Runtime.getRuntime();
|
||||
freeMemory = runtime.freeMemory();
|
||||
maxMemory = runtime.maxMemory();
|
||||
totalMemory = runtime.totalMemory();
|
||||
this.scenarios = scenarios;
|
||||
}
|
||||
|
||||
/**
|
||||
* Methode, die schreibt das Health Xml für optimale Status
|
||||
*
|
||||
*/
|
||||
Document writeHealthXml() {
|
||||
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
|
||||
DocumentBuilder dBuilder;
|
||||
Document doc = null;
|
||||
try {
|
||||
dBuilder = dbFactory.newDocumentBuilder();
|
||||
doc = dBuilder.newDocument();
|
||||
Element rootElement = doc.createElementNS("https://localhost:8080/Health", "Health");
|
||||
doc.appendChild(rootElement);
|
||||
rootElement.appendChild(getMemory(doc, freeMemory, maxMemory, totalMemory));
|
||||
rootElement.appendChild(getState(doc));
|
||||
rootElement.appendChild(getScenario(doc, scenarios));
|
||||
} catch (ParserConfigurationException e) {
|
||||
log.error("Fehler beim Schreiben der Status-Informationen", e);
|
||||
}
|
||||
return doc;
|
||||
}
|
||||
|
||||
/**
|
||||
* Methode, die schreibt das System Status Node im Xml File
|
||||
*
|
||||
* @param doc Vom Typ Dokument.
|
||||
*
|
||||
*/
|
||||
private Node getState(Document doc) {
|
||||
Element state = doc.createElement("state");
|
||||
state.setAttribute("indicator", "OK");
|
||||
Element stateNode = doc.createElement("message");
|
||||
stateNode.appendChild(doc.createTextNode("System is up and running normally"));
|
||||
state.appendChild(stateNode);
|
||||
return state;
|
||||
}
|
||||
|
||||
/**
|
||||
* Methode, die schreibt das Scnarios Information Node im Xml File
|
||||
*
|
||||
* @param doc Vom Typ Dokument .
|
||||
* @param scenarios Vom Typ {@link Scenarios} das verwendete scenario.
|
||||
*
|
||||
*/
|
||||
private Node getScenario(Document doc, Scenarios scenarios) {
|
||||
Element scenario = doc.createElement("scenario");
|
||||
Element scenarioNameNode = doc.createElement("name");
|
||||
scenarioNameNode.appendChild(doc.createTextNode(scenarios.getName()));
|
||||
scenario.appendChild(scenarioNameNode);
|
||||
return scenario;
|
||||
}
|
||||
|
||||
/**
|
||||
* Methode, die schreibt das Scnarios Information Node im Xml File
|
||||
*
|
||||
* @param doc Vom Typ Dokument .
|
||||
* @param freeMemory Vom Typ long , der freier Speicher.
|
||||
* @param maxMemory Vom Typ long , der maximaler Speicher
|
||||
* @param totalMemory Vom Typ long , der Gesamte speicher.
|
||||
*
|
||||
*/
|
||||
private static Node getMemory(Document doc, long freeMemory, long maxMemory, long totalMemory) {
|
||||
Element memory = doc.createElement("memoryState");
|
||||
String freeM = Long.toString(freeMemory);
|
||||
Element freeMNode = doc.createElement("freeMemory");
|
||||
freeMNode.appendChild(doc.createTextNode(freeM));
|
||||
memory.appendChild(freeMNode);
|
||||
String maxM = Long.toString(maxMemory);
|
||||
Element maxMNode = doc.createElement("maxMemory");
|
||||
maxMNode.appendChild(doc.createTextNode(maxM));
|
||||
memory.appendChild(maxMNode);
|
||||
String totalM = Long.toString(totalMemory);
|
||||
Element totalMNode = doc.createElement("totalMemory");
|
||||
totalMNode.appendChild(doc.createTextNode(totalM));
|
||||
memory.appendChild(totalMNode);
|
||||
return memory;
|
||||
}
|
||||
}
|
||||
|
|
@ -21,6 +21,10 @@ package de.kosit.validationtool.impl;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import de.kosit.validationtool.model.scenarios.Scenarios;
|
||||
import org.w3c.dom.Document;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -56,6 +60,7 @@ public class DefaultCheck implements Check {
|
|||
|
||||
private static final String ENGINE_VERSION = "1.0.0";
|
||||
|
||||
@Getter
|
||||
private ScenarioRepository repository;
|
||||
|
||||
@Getter
|
||||
|
|
@ -63,6 +68,7 @@ public class DefaultCheck implements Check {
|
|||
|
||||
private ConversionService conversionService;
|
||||
|
||||
|
||||
@Getter
|
||||
private List<CheckAction> checkSteps;
|
||||
|
||||
|
|
@ -135,5 +141,4 @@ public class DefaultCheck implements Check {
|
|||
transporter.getReportInput().setDocumentIdentification(i);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ public class ScenarioRepository {
|
|||
|
||||
private XsltExecutable noScenarioReport;
|
||||
|
||||
@Getter(value = AccessLevel.PACKAGE)
|
||||
@Getter
|
||||
private Scenarios scenarios;
|
||||
|
||||
private static boolean isSupportedDocument(XdmNode doc) {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
<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.
|
||||
solches Dokument kann der Kommandozeilenversion des Prüftools über --implemenation-assertions übergeben werden.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:complexType>
|
||||
|
|
|
|||
74
src/test/java/de/kosit/validationtool/cmd/DaemonIT.java
Normal file
74
src/test/java/de/kosit/validationtool/cmd/DaemonIT.java
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
package de.kosit.validationtool.cmd;
|
||||
|
||||
import static io.restassured.RestAssured.given;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import io.restassured.RestAssured;
|
||||
|
||||
/**
|
||||
* Testet the Daemon-Mode input , Methoden , Output Content-Type and the success case
|
||||
*
|
||||
* @author Roula Antoun
|
||||
*/
|
||||
public class DaemonIT {
|
||||
|
||||
private static final String EXAMPLE_FILE = "examples/UBLReady/UBLReady_EU_UBL-NL_20170102_FULL.xml";
|
||||
|
||||
private static final String APPLICATION_XML = "application/xml";
|
||||
|
||||
private static final String INVALID_XML = "examples/UBLReady/UBLReady_EU_UBL-NL_20170102_FULL-invalid.xml";
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
final String port = System.getProperty("daemon.port");
|
||||
if (port != null) {
|
||||
RestAssured.port = Integer.valueOf(port);
|
||||
}
|
||||
final String baseHost = System.getProperty("daemon.host");
|
||||
if (baseHost != null) {
|
||||
RestAssured.baseURI = baseHost;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void makeSureThatSuccessTest() throws IOException {
|
||||
try ( InputStream io = DaemonIT.class.getClassLoader().getResourceAsStream(EXAMPLE_FILE) ) {
|
||||
given().contentType(APPLICATION_XML).body(io).when().post("/").then().statusCode(200);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void NoInputTest() {
|
||||
given().body("").contentType(APPLICATION_XML).when().post("/").then().statusCode(400);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void internalServerErrorTest() throws IOException {
|
||||
try ( InputStream io = DaemonIT.class.getClassLoader().getResourceAsStream(INVALID_XML) ) {
|
||||
given().contentType(APPLICATION_XML).body(io).when().post("/").then().statusCode(200);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void methodNotAllowedTest() {
|
||||
given().when().get("/").then().statusCode(405);
|
||||
given().when().put("/").then().statusCode(405);
|
||||
given().when().patch("/").then().statusCode(405);
|
||||
given().when().delete("/").then().statusCode(405);
|
||||
given().when().head("/").then().statusCode(405);
|
||||
given().when().options("/").then().statusCode(405);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void xmlResultTest() throws IOException {
|
||||
try ( InputStream io = DaemonIT.class.getClassLoader().getResourceAsStream(EXAMPLE_FILE) ) {
|
||||
given().body(io).when().post("/").then().contentType(APPLICATION_XML).and().statusCode(200);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -104,7 +104,7 @@
|
|||
<xsl:with-param name="parent-id" select="$id"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:variable>
|
||||
<!-- Skip output for implicit validation steps (i. e., wellformedness check) unless there is anything to tell -->
|
||||
<!-- Skip output for implicit validation steps (i. e., wellformedness implemenation) unless there is anything to tell -->
|
||||
<xsl:if test="exists($messages) or exists(s:resource)">
|
||||
<rep:validationStepResult id="{$id}"
|
||||
valid="{if ($messages[@level = ('warning', 'error')]) then false() else true()}">
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@
|
|||
<xsl:variable name="messages" as="element(rep:message)*">
|
||||
<xsl:apply-templates select="in:xmlSyntaxError"/>
|
||||
</xsl:variable>
|
||||
<!-- Skip output for implicit validation steps (i. e., wellformedness check) unless there is anything to tell -->
|
||||
<!-- Skip output for implicit validation steps (i. e., wellformedness implemenation) unless there is anything to tell -->
|
||||
<xsl:if test="exists($messages) or exists(s:resource)">
|
||||
<rep:validationStepResult valid="{if ($messages[@level = ('warning', 'error')]) then false() else true()}">
|
||||
<xsl:apply-templates mode="copy-to-report-ns" select="s:resource"/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue