mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-25 16:55:39 +00:00
Merge branch 'master' of https://projekte.kosit.org/kosit/validator
This commit is contained in:
commit
0e2ed09d13
80 changed files with 18990 additions and 550 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -6,8 +6,7 @@
|
|||
# Log file
|
||||
*.log
|
||||
.idea
|
||||
.settings
|
||||
*.iml
|
||||
#*.iml
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
|
|
|
|||
29
.gitlab-ci.yml
Normal file
29
.gitlab-ci.yml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
image: maven:latest
|
||||
|
||||
variables:
|
||||
MAVEN_CLI_OPTS: " --batch-mode -Dmaven.repo.local=repository -Dfile.encoding=UTF-8"
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- repository
|
||||
|
||||
build-validator:
|
||||
stage: build
|
||||
script:
|
||||
- mvn $MAVEN_CLI_OPTS -Pjava-11,java-8,gitlab verify
|
||||
|
||||
artifacts:
|
||||
name: build-results
|
||||
paths:
|
||||
- target/*.jar
|
||||
reports:
|
||||
junit:
|
||||
- target/surefire-reports/*.xml
|
||||
- target/failsafe-reports/*.xml
|
||||
|
||||
#deploy:
|
||||
# stage: deploy
|
||||
# script:
|
||||
# - mvn $MAVEN_CLI_OPTS deploy
|
||||
# only:
|
||||
# - master
|
||||
16
.idea/checkstyle-idea.xml
generated
Normal file
16
.idea/checkstyle-idea.xml
generated
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CheckStyle-IDEA">
|
||||
<option name="configuration">
|
||||
<map>
|
||||
<entry key="checkstyle-version" value="8.16" />
|
||||
<entry key="copy-libs" value="true" />
|
||||
<entry key="location-0" value="BUNDLED:(bundled):Sun Checks" />
|
||||
<entry key="location-1" value="BUNDLED:(bundled):Google Checks" />
|
||||
<entry key="scan-before-checkin" value="false" />
|
||||
<entry key="scanscope" value="JavaOnly" />
|
||||
<entry key="suppress-errors" value="false" />
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
13
.idea/compiler.xml
generated
Normal file
13
.idea/compiler.xml
generated
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="validationtool" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
</project>
|
||||
15
.idea/eclipseCodeFormatter.xml
generated
Normal file
15
.idea/eclipseCodeFormatter.xml
generated
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="EclipseCodeFormatterProjectSettings">
|
||||
<option name="projectSpecificProfile">
|
||||
<ProjectSpecificProfile>
|
||||
<option name="formatSeletedTextInAllFileTypes" value="false" />
|
||||
<option name="formatter" value="ECLIPSE" />
|
||||
<option name="importOrderConfigFilePath" value="$PROJECT_DIR$/.settings/org.eclipse.jdt.ui.prefs" />
|
||||
<option name="importOrderFromFile" value="true" />
|
||||
<option name="pathToConfigFileJava" value="$PROJECT_DIR$/.settings/org.eclipse.jdt.core.prefs" />
|
||||
<option name="useForLiveTemplates" value="true" />
|
||||
</ProjectSpecificProfile>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
7
.idea/encodings.xml
generated
Normal file
7
.idea/encodings.xml
generated
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with NO BOM">
|
||||
<file url="file://$PROJECT_DIR$" charset="UTF-8" />
|
||||
<file url="PROJECT" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
||||
83
.idea/misc.xml
generated
Normal file
83
.idea/misc.xml
generated
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MarkdownProjectSettings">
|
||||
<PreviewSettings splitEditorLayout="SPLIT" splitEditorPreview="PREVIEW" useGrayscaleRendering="false" zoomFactor="1.0" maxImageWidth="0" showGitHubPageIfSynced="false" allowBrowsingInPreview="false" synchronizePreviewPosition="true" highlightPreviewType="LINE" highlightFadeOut="5" highlightOnTyping="true" synchronizeSourcePosition="true">
|
||||
<PanelProvider>
|
||||
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.panel" providerName="Default - Swing" />
|
||||
</PanelProvider>
|
||||
</PreviewSettings>
|
||||
<ParserSettings>
|
||||
<PegdownExtensions>
|
||||
<option name="ABBREVIATIONS" value="false" />
|
||||
<option name="ANCHORLINKS" value="true" />
|
||||
<option name="ATXHEADERSPACE" value="true" />
|
||||
<option name="AUTOLINKS" value="true" />
|
||||
<option name="DEFINITIONS" value="false" />
|
||||
<option name="FENCED_CODE_BLOCKS" value="true" />
|
||||
<option name="FOOTNOTES" value="false" />
|
||||
<option name="HARDWRAPS" value="false" />
|
||||
<option name="INSERTED" value="false" />
|
||||
<option name="QUOTES" value="false" />
|
||||
<option name="RELAXEDHRULES" value="true" />
|
||||
<option name="SMARTS" value="false" />
|
||||
<option name="STRIKETHROUGH" value="true" />
|
||||
<option name="SUBSCRIPT" value="false" />
|
||||
<option name="SUPERSCRIPT" value="false" />
|
||||
<option name="SUPPRESS_HTML_BLOCKS" value="false" />
|
||||
<option name="SUPPRESS_INLINE_HTML" value="false" />
|
||||
<option name="TABLES" value="true" />
|
||||
<option name="TASKLISTITEMS" value="true" />
|
||||
<option name="TOC" value="false" />
|
||||
<option name="WIKILINKS" value="true" />
|
||||
</PegdownExtensions>
|
||||
<ParserOptions>
|
||||
<option name="COMMONMARK_LISTS" value="false" />
|
||||
<option name="DUMMY" value="false" />
|
||||
<option name="EMOJI_SHORTCUTS" value="true" />
|
||||
<option name="FLEXMARK_FRONT_MATTER" value="false" />
|
||||
<option name="GFM_TABLE_RENDERING" value="true" />
|
||||
<option name="GITBOOK_URL_ENCODING" value="false" />
|
||||
<option name="GITHUB_EMOJI_URL" value="false" />
|
||||
<option name="GITHUB_LISTS" value="true" />
|
||||
<option name="GITHUB_WIKI_LINKS" value="true" />
|
||||
<option name="JEKYLL_FRONT_MATTER" value="false" />
|
||||
<option name="SIM_TOC_BLANK_LINE_SPACER" value="true" />
|
||||
</ParserOptions>
|
||||
</ParserSettings>
|
||||
<HtmlSettings headerTopEnabled="false" headerBottomEnabled="false" bodyTopEnabled="false" bodyBottomEnabled="false" embedUrlContent="false" addPageHeader="true">
|
||||
<GeneratorProvider>
|
||||
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.generator" providerName="Default Swing HTML Generator" />
|
||||
</GeneratorProvider>
|
||||
<headerTop />
|
||||
<headerBottom />
|
||||
<bodyTop />
|
||||
<bodyBottom />
|
||||
</HtmlSettings>
|
||||
<CssSettings previewScheme="UI_SCHEME" cssUri="" isCssUriEnabled="false" isCssTextEnabled="false" isDynamicPageWidth="true">
|
||||
<StylesheetProvider>
|
||||
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.css" providerName="Default Swing Stylesheet" />
|
||||
</StylesheetProvider>
|
||||
<ScriptProviders />
|
||||
<cssText />
|
||||
</CssSettings>
|
||||
<HtmlExportSettings updateOnSave="false" parentDir="$ProjectFileDir$" targetDir="$ProjectFileDir$" cssDir="" scriptDir="" plainHtml="false" imageDir="" copyLinkedImages="false" imageUniquifyType="0" targetExt="" useTargetExt="false" noCssNoScripts="false" linkToExportedHtml="true" exportOnSettingsChange="true" regenerateOnProjectOpen="false" />
|
||||
<LinkMapSettings>
|
||||
<textMaps />
|
||||
</LinkMapSettings>
|
||||
</component>
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="NodePackageJsonFileManager">
|
||||
<packageJsonPaths />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" project-jdk-name="11" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
<component name="jetbrains.communicator.idea.IdProvider" IDEtalkID="4B2DA906C3A7DF4F7B6EA28093E19A3F" />
|
||||
</project>
|
||||
22
.idea/saveactions_settings.xml
generated
Normal file
22
.idea/saveactions_settings.xml
generated
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="SaveActionSettings">
|
||||
<option name="actions">
|
||||
<set>
|
||||
<option value="activate" />
|
||||
<option value="activateOnShortcut" />
|
||||
<option value="activateOnBatch" />
|
||||
<option value="organizeImports" />
|
||||
<option value="reformatChangedCode" />
|
||||
<option value="rearrange" />
|
||||
<option value="fieldCanBeFinal" />
|
||||
<option value="localCanBeFinal" />
|
||||
<option value="methodMayBeStatic" />
|
||||
<option value="unqualifiedFieldAccess" />
|
||||
<option value="missingOverrideAnnotation" />
|
||||
<option value="useBlocks" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="configurationPath" value="" />
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
419
.settings/org.eclipse.jdt.core.prefs
Normal file
419
.settings/org.eclipse.jdt.core.prefs
Normal file
|
|
@ -0,0 +1,419 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
|
||||
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
|
||||
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
|
||||
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deadCode=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deprecation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
|
||||
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
|
||||
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
|
||||
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
|
||||
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
|
||||
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
|
||||
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
|
||||
org.eclipse.jdt.core.compiler.problem.nullReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
|
||||
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning
|
||||
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
|
||||
org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
|
||||
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
|
||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=warning
|
||||
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
|
||||
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
|
||||
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||
org.eclipse.jdt.core.compiler.processAnnotations=disabled
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
|
||||
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=18
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
|
||||
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=83
|
||||
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
|
||||
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_field=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_method=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_package=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
|
||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
|
||||
org.eclipse.jdt.core.formatter.comment.format_block_comments=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_header=false
|
||||
org.eclipse.jdt.core.formatter.comment.format_html=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_line_comments=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_source_code=true
|
||||
org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
|
||||
org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
|
||||
org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
|
||||
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
|
||||
org.eclipse.jdt.core.formatter.comment.line_length=120
|
||||
org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
|
||||
org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
|
||||
org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
|
||||
org.eclipse.jdt.core.formatter.compact_else_if=true
|
||||
org.eclipse.jdt.core.formatter.continuation_indentation=2
|
||||
org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
|
||||
org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
|
||||
org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
|
||||
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
|
||||
org.eclipse.jdt.core.formatter.indent_empty_lines=false
|
||||
org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
|
||||
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
|
||||
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
|
||||
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
|
||||
org.eclipse.jdt.core.formatter.indentation.size=4
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.join_lines_in_comments=true
|
||||
org.eclipse.jdt.core.formatter.join_wrapped_lines=true
|
||||
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
|
||||
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
|
||||
org.eclipse.jdt.core.formatter.lineSplit=140
|
||||
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
|
||||
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
|
||||
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
|
||||
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
|
||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines
|
||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines
|
||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines
|
||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines
|
||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines
|
||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines
|
||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines
|
||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines
|
||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines
|
||||
org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines
|
||||
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
|
||||
org.eclipse.jdt.core.formatter.tabulation.char=space
|
||||
org.eclipse.jdt.core.formatter.tabulation.size=4
|
||||
org.eclipse.jdt.core.formatter.use_on_off_tags=true
|
||||
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
|
||||
org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false
|
||||
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
|
||||
org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true
|
||||
org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
|
||||
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
|
||||
org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter
|
||||
127
.settings/org.eclipse.jdt.ui.prefs
Normal file
127
.settings/org.eclipse.jdt.ui.prefs
Normal file
File diff suppressed because one or more lines are too long
11
README.md
11
README.md
|
|
@ -25,8 +25,7 @@ Fach- bzw. Standardspezifische Prüfkonfigurationen sind in eigene Module bzw. R
|
|||
|
||||
## Prüfkonfiguration XRechnung
|
||||
|
||||
Eine eigenständige Konfiguration für den Standard XRechnung wird ebenfalls auf [GitHub bereitgestellt](https://github.com/itplr-kosit/validator-configuration-xrechnung) ([Releases](https://github.com/itplr-kosit/validator-configuration-xrechnung/releases)). Diese enthält alle notwendigen Resourcen zu der Norm EN16931 (XML-Schema und [Schematron Regeln] (https://github.com/CenPC434/validation) u.a.) und die Resourcen des Standards
|
||||
[XRechnung](http://www.xoev.de/de/xrechnung) in ihren aktuellen Entwurfsversionen.
|
||||
Eine eigenständige Konfiguration für den Standard [XRechnung](http://www.xoev.de/de/xrechnung) wird ebenfalls auf [GitHub bereitgestellt](https://github.com/itplr-kosit/validator-configuration-xrechnung) ([Releases](https://github.com/itplr-kosit/validator-configuration-xrechnung/releases)). Diese enthält alle notwendigen Ressourcen zu der Norm EN16931 (XML-Schema und [Schematron Regeln] (https://github.com/CenPC434/validation) u.a.) und die [XRechnung Schematron Regeln](https://github.com/itplr-kosit/xrechnung-schematron) in ihren aktuellen Versionen.
|
||||
|
||||
Der geregelte Betrieb dieser Konfiguration wird im Rahmen des Betriebs des Standards XRechnung erfolgen.
|
||||
|
||||
|
|
@ -132,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
|
||||
|
|
@ -149,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);
|
||||
|
||||
```
|
||||
|
||||
|
|
@ -285,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).
|
||||
|
|
|
|||
56
dist/assembly-full.xml
vendored
56
dist/assembly-full.xml
vendored
|
|
@ -1,56 +0,0 @@
|
|||
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
|
||||
<id>full</id>
|
||||
<formats>
|
||||
<format>dir</format>
|
||||
<format>zip</format>
|
||||
</formats>
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>${project.parent.basedir}</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<includes>
|
||||
<include>LICENSE*</include>
|
||||
<include>NOTICE*</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<!-- <fileSet>
|
||||
<directory>${project.build.directory}/xrechnung</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
</fileSet> -->
|
||||
</fileSets>
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<scope>runtime</scope>
|
||||
<outputFileNameMapping>${artifact.artifactId}-${artifact.baseVersion}-${artifact.classifier}.${artifact.extension}</outputFileNameMapping>
|
||||
<includes>
|
||||
<include>${project.groupId}:validationtool:jar:*:standalone</include>
|
||||
<include>${project.groupId}:validationtool:jar:*:full</include>
|
||||
<include>${project.groupId}:validationtool:jar:*:sources</include>
|
||||
</includes>
|
||||
</dependencySet>
|
||||
<dependencySet>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<scope>runtime</scope>
|
||||
<outputFileNameMapping>${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension}</outputFileNameMapping>
|
||||
<includes>
|
||||
<include>${project.groupId}:validationtool</include>
|
||||
</includes>
|
||||
</dependencySet>
|
||||
<dependencySet>
|
||||
<outputDirectory>/libs</outputDirectory>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<scope>runtime</scope>
|
||||
<outputFileNameMapping>${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension}</outputFileNameMapping>
|
||||
<excludes>
|
||||
<exclude>${project.groupId}:validationtool</exclude>
|
||||
</excludes>
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
|
||||
</assembly>
|
||||
36
dist/assembly-standalone.xml
vendored
36
dist/assembly-standalone.xml
vendored
|
|
@ -1,36 +0,0 @@
|
|||
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
|
||||
<id>standalone</id>
|
||||
<formats>
|
||||
<format>dir</format>
|
||||
<format>zip</format>
|
||||
</formats>
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>${project.parent.basedir}</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<includes>
|
||||
<include>LICENSE*</include>
|
||||
<include>NOTICE*</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<!-- <fileSet>
|
||||
<directory>${project.build.directory}/xrechnung</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
</fileSet> -->
|
||||
</fileSets>
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<scope>runtime</scope>
|
||||
<outputFileNameMapping>${artifact.artifactId}-${artifact.baseVersion}-${artifact.classifier}.${artifact.extension}</outputFileNameMapping>
|
||||
<includes>
|
||||
<include>${project.groupId}:validationtool:jar:*:standalone</include>
|
||||
<include>${project.groupId}:validationtool:jar:*:sources</include>
|
||||
</includes>
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
</assembly>
|
||||
135
dist/pom.xml
vendored
135
dist/pom.xml
vendored
|
|
@ -1,135 +0,0 @@
|
|||
<?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.
|
||||
-->
|
||||
|
||||
<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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>de.kosit</groupId>
|
||||
<artifactId>validationtool-base</artifactId>
|
||||
<version>1.0.2-SNAPSHOT</version>
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
<artifactId>validationtool-dist</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>KoSIT XML Prüftool Distribution</name>
|
||||
<description>KoSIT XML Prüftool zur Prüfung von XML Dateien gegenüber definierten Szenarien.</description>
|
||||
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>de.kosit</groupId>
|
||||
<artifactId>validationtool</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.kosit</groupId>
|
||||
<artifactId>validationtool</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<classifier>standalone</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.kosit</groupId>
|
||||
<artifactId>validationtool</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<classifier>sources</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.kosit</groupId>
|
||||
<artifactId>validationtool</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<classifier>full</classifier>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- <plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.9</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>unpack</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}/xrechnung</outputDirectory>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>xrechnung</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>zip</type>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin> -->
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>standalone</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<descriptor>assembly-standalone.xml</descriptor>
|
||||
</descriptors>
|
||||
<attach>true</attach>
|
||||
<appendAssemblyId>true</appendAssemblyId>
|
||||
<outputDirectory>target/</outputDirectory>
|
||||
<workDirectory>target/assembly/standalone</workDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>full</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<descriptor>assembly-full.xml</descriptor>
|
||||
</descriptors>
|
||||
<attach>true</attach>
|
||||
<appendAssemblyId>true</appendAssemblyId>
|
||||
<outputDirectory>target/</outputDirectory>
|
||||
<workDirectory>target/assembly/full</workDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
26
docs/contribute.md
Normal file
26
docs/contribute.md
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# Setup development environment
|
||||
|
||||
## Prerequisites
|
||||
We use IntelliJ >= 2018.3 and OpenJDK 11 for development. If you like to contribute please use the following plugins:
|
||||
|
||||
1. Checkstyle Plugin
|
||||
1. Lombok Plugin
|
||||
1. Eclipse Formatter Plugin (see below)
|
||||
|
||||
Any other IDE should be sufficient too. Just use suitable tools, plugins and setup comparable to our IntelliJ stuff.
|
||||
|
||||
## Import into IDE
|
||||
For IntelliJ we provide a suitable configuration within the code. Just clone the repository locally and open it in IntelliJ
|
||||
and you are up and running.
|
||||
|
||||
For other IDEs the correct setup is up to you.
|
||||
|
||||
## Code Formatting
|
||||
We use an automatic formatting of the source code in our environment. This is based on the Eclipse code formatter functionality
|
||||
due to historical reasons. This not only works in Eclipse but also in IntelliJ (via plugin) and can be used standalone.
|
||||
|
||||
The configuration can be found in `.settings`-directory. For IntelliJ this is all set up. Additionally this should work in Eclipse out of the box.
|
||||
Another potential usage scenario would be to integrate the formatter via git hooks into the commit-pipeline (e.g [Example Hook](https://gist.github.com/ktoso/708972) ).
|
||||
For other IDEs you are on your own.
|
||||
|
||||
|
||||
393
pom.xml
393
pom.xml
|
|
@ -18,18 +18,17 @@
|
|||
~ under the License.
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
<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>
|
||||
<maven>3.3.9</maven>
|
||||
</prerequisites>
|
||||
|
||||
<name>KoSIT XML Prüftool Implementierung</name>
|
||||
|
||||
<groupId>de.kosit</groupId>
|
||||
<version>1.0.2-SNAPSHOT</version>
|
||||
<groupId>de.kosit</groupId>
|
||||
<version>1.1.0-SNAPSHOT</version>
|
||||
|
||||
<artifactId>validationtool</artifactId>
|
||||
<description>KoSIT XML Prüftool zur Prüfung von XML Dateien gegenüber definierten Szenarien.</description>
|
||||
|
|
@ -49,10 +48,11 @@
|
|||
</developers>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<version.jacoco>0.7.9</version.jacoco>
|
||||
<version.lombok>1.16.16</version.lombok>
|
||||
<version.saxon-he>9.7.0-15</version.saxon-he>
|
||||
<version.jacoco>0.8.3</version.jacoco>
|
||||
<version.lombok>1.18.6</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>
|
||||
|
|
@ -77,6 +77,7 @@
|
|||
<groupId>commons-cli</groupId>
|
||||
<artifactId>commons-cli</artifactId>
|
||||
<version>1.4</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
|
|
@ -90,6 +91,11 @@
|
|||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<version>2.3.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
|
|
@ -102,13 +108,18 @@
|
|||
<version>4.12</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>1.3.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.rest-assured</groupId>
|
||||
<artifactId>rest-assured</artifactId>
|
||||
<version>3.2.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
|
@ -123,77 +134,110 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.6.1</version>
|
||||
<version>3.8.0</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.20</version>
|
||||
<configuration>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.2.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>jdk11+</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<finalName>validationtool-${project.version}-standalone</finalName>
|
||||
<transformers>
|
||||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||
<mainClass>de.kosit.validationtool.cmd.CommandLineApplication</mainClass>
|
||||
</transformer>
|
||||
<transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
|
||||
<resource>META-INF/TE-050AC.SF</resource>
|
||||
</transformer>
|
||||
</transformers>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>jdk8</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<finalName>validationtool-${project.version}-java8-standalone</finalName>
|
||||
<artifactSet>
|
||||
<excludes>
|
||||
<exclude>org.glassfish.jaxb:jaxb-runtime</exclude>
|
||||
<exclude>com.sun.istack:istack-commons-runtime</exclude>
|
||||
<exclude>com.sun.xml.fastinfoset:FastInfoset</exclude>
|
||||
<exclude>jakarta.activation:jakarta.activation-api</exclude>
|
||||
<exclude>jakarta.xml.bind:jakarta.xml.bind-api</exclude>
|
||||
<exclude>org.jvnet.staxex:stax-ex</exclude>
|
||||
<exclude>org.glassfish.jaxb:txw2</exclude>
|
||||
</excludes>
|
||||
</artifactSet>
|
||||
<transformers>
|
||||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||
<mainClass>de.kosit.validationtool.cmd.CommandLineApplication</mainClass>
|
||||
</transformer>
|
||||
<transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
|
||||
<!-- Signatur von saxon entfernen - sonst läuft die standalone-anwendung nicht -->
|
||||
<resource>META-INF/TE-050AC.SF</resource>
|
||||
</transformer>
|
||||
</transformers>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<forkMode>always</forkMode>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.3.1</version>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>simplelogger.properties</exclude>
|
||||
<exclude>de/kosit/validationtool/cmd/**</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>standalone</id>
|
||||
<id>standalone_dist</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>
|
||||
de.kosit.validationtool.cmd.CommandLineApplication
|
||||
</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
<descriptors>
|
||||
<descriptor>src/main/assembly/assembly-standalone.xml</descriptor>
|
||||
<descriptor>src/assembly/assembly-standalone.xml</descriptor>
|
||||
</descriptors>
|
||||
<attach>true</attach>
|
||||
<appendAssemblyId>true</appendAssemblyId>
|
||||
<outputDirectory>target/</outputDirectory>
|
||||
<workDirectory>target/assembly/standalone</workDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>full</id>
|
||||
<id>full_dist</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>
|
||||
de.kosit.validationtool.cmd.CommandLineApplication
|
||||
</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
<descriptors>
|
||||
<descriptor>src/main/assembly/assembly-full.xml</descriptor>
|
||||
<descriptor>src/assembly/assembly-full.xml</descriptor>
|
||||
</descriptors>
|
||||
<attach>true</attach>
|
||||
<appendAssemblyId>true</appendAssemblyId>
|
||||
<outputDirectory>target/</outputDirectory>
|
||||
<workDirectory>target/assembly/full</workDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
|
||||
<plugin>
|
||||
<!-- Integrate the /src/main/generated folder -->
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
|
|
@ -219,7 +263,7 @@
|
|||
<plugin>
|
||||
<groupId>org.jvnet.jaxb2.maven2</groupId>
|
||||
<artifactId>maven-jaxb2-plugin</artifactId>
|
||||
<version>0.13.2</version>
|
||||
<version>0.14.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
|
|
@ -298,14 +342,7 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
<version>2.5.3</version>
|
||||
<configuration>
|
||||
<tagNameFormat>v@{project.version}</tagNameFormat>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
|
|
@ -317,8 +354,258 @@
|
|||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>java-8</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<version>2.22.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>test-java8</id>
|
||||
<goals>
|
||||
<goal>integration-test</goal>
|
||||
<goal>verify</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<!--suppress MavenModelInspection -->
|
||||
<argLine>
|
||||
-Ddaemon.port=8081
|
||||
-Ddaemon.host=http://${docker.host}
|
||||
</argLine>
|
||||
<summaryFile>${project.build.directory}/failsafe-reports/failsafe-summary-java8.xml</summaryFile>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>test-java-8-jdk-jaxb</id>
|
||||
<goals>
|
||||
<goal>integration-test</goal>
|
||||
<goal>verify</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<!--suppress MavenModelInspection -->
|
||||
<argLine>
|
||||
-Ddaemon.port=8082
|
||||
-Ddaemon.host=http://${docker.host}
|
||||
</argLine>
|
||||
<summaryFile>${project.build.directory}/failsafe-reports/failsafe-summary-java8-jdk-jaxb.xml
|
||||
</summaryFile>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>0.28.0</version>
|
||||
<configuration>
|
||||
<dockerHost>tcp://${docker.host}:2375</dockerHost>
|
||||
<showLogs>true</showLogs>
|
||||
<startParallel>true</startParallel>
|
||||
<verbose>false</verbose>
|
||||
<containerNamePattern>validator-%n-%t-%i-java8</containerNamePattern>
|
||||
</configuration>
|
||||
|
||||
<executions>
|
||||
<execution>
|
||||
<id>up8</id>
|
||||
<phase>pre-integration-test</phase>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
<goal>start</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<images>
|
||||
<image>
|
||||
<alias>daemon8</alias>
|
||||
<name>daemon8</name>
|
||||
<build>
|
||||
<dockerFileDir>daemon</dockerFileDir>
|
||||
<dockerFile>Dockerfile-java8</dockerFile>
|
||||
<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>8081:8080</port>
|
||||
</ports>
|
||||
<wait>
|
||||
<time>5000</time>
|
||||
</wait>
|
||||
</run>
|
||||
</image>
|
||||
<image>
|
||||
<alias>daemon8-jdk-jaxb</alias>
|
||||
<name>daemon8-jdk-jaxb</name>
|
||||
<build>
|
||||
<dockerFileDir>daemon</dockerFileDir>
|
||||
<dockerFile>Dockerfile-java8-jdk-jaxb</dockerFile>
|
||||
<assembly>
|
||||
<inline>
|
||||
<files>
|
||||
<file>
|
||||
<source>
|
||||
${project.build.directory}/validationtool-${project.version}-java8-standalone.jar
|
||||
</source>
|
||||
<destName>validationtool-standalone.jar</destName>
|
||||
</file>
|
||||
</files>
|
||||
</inline>
|
||||
</assembly>
|
||||
</build>
|
||||
<run>
|
||||
<network>
|
||||
<mode>bridge</mode>
|
||||
</network>
|
||||
<ports>
|
||||
<port>8082:8080</port>
|
||||
</ports>
|
||||
<wait>
|
||||
<time>5000</time>
|
||||
</wait>
|
||||
</run>
|
||||
</image>
|
||||
</images>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>down8</id>
|
||||
<phase>post-integration-test</phase>
|
||||
<goals>
|
||||
<goal>stop</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>java-11</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<version>2.22.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>test-jdk11</id>
|
||||
<goals>
|
||||
<goal>integration-test</goal>
|
||||
<goal>verify</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<!--suppress MavenModelInspection -->
|
||||
<argLine>
|
||||
-Ddaemon.port=8080
|
||||
-Ddaemon.host=http://${docker.host}
|
||||
</argLine>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>0.28.0</version>
|
||||
<configuration>
|
||||
<dockerHost>tcp://${docker.host}:2375</dockerHost>
|
||||
<showLogs>true</showLogs>
|
||||
<startParallel>true</startParallel>
|
||||
<verbose>false</verbose>
|
||||
<containerNamePattern>validator-%n-%t-%i-java8</containerNamePattern>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>up11</id>
|
||||
<phase>pre-integration-test</phase>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
<goal>start</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<images>
|
||||
<image>
|
||||
<alias>daemon11</alias>
|
||||
<name>daemon11</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>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>down11</id>
|
||||
<phase>post-integration-test</phase>
|
||||
<goals>
|
||||
<goal>stop</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>gitlab</id>
|
||||
<properties>
|
||||
<docker.host>host.docker.internal</docker.host>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
<scm>
|
||||
<connection>https://github.com/itplr-kosit/validationtool.git</connection>
|
||||
<developerConnection>scm:git:https://github.com/itplr-kosit/validationtool.git</developerConnection>
|
||||
<tag>v1.0.0</tag>
|
||||
</scm>
|
||||
|
||||
</project>
|
||||
56
src/assembly/assembly-full.xml
Normal file
56
src/assembly/assembly-full.xml
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
|
||||
<id>full</id>
|
||||
<formats>
|
||||
<format>dir</format>
|
||||
<format>zip</format>
|
||||
</formats>
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>${project.basedir}</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<includes>
|
||||
<include>LICENSE*</include>
|
||||
<include>NOTICE*</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<includes>
|
||||
<include>validationtool-*.jar</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
</fileSets>
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
<outputDirectory>/libs</outputDirectory>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<scope>runtime</scope>
|
||||
<outputFileNameMapping>${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension}</outputFileNameMapping>
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
|
||||
</assembly>
|
||||
46
src/assembly/assembly-standalone.xml
Normal file
46
src/assembly/assembly-standalone.xml
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
|
||||
<id>standalone</id>
|
||||
<formats>
|
||||
<format>dir</format>
|
||||
<format>zip</format>
|
||||
</formats>
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>${project.basedir}</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<includes>
|
||||
<include>LICENSE*</include>
|
||||
<include>NOTICE*</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<includes>
|
||||
<include>validationtool-*standalone.jar</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</assembly>
|
||||
8
src/main/docker/daemon/Dockerfile
Normal file
8
src/main/docker/daemon/Dockerfile
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
FROM openjdk:11
|
||||
|
||||
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" ]
|
||||
8
src/main/docker/daemon/Dockerfile-java8
Normal file
8
src/main/docker/daemon/Dockerfile-java8
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" ]
|
||||
8
src/main/docker/daemon/Dockerfile-java8-jdk-jaxb
Normal file
8
src/main/docker/daemon/Dockerfile-java8-jdk-jaxb
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 -H 0.0.0.0
|
||||
|
|
@ -24,30 +24,57 @@ import java.util.stream.Collectors;
|
|||
|
||||
import org.w3c.dom.Document;
|
||||
|
||||
import net.sf.saxon.dom.NodeOverNodeInfo;
|
||||
import net.sf.saxon.s9api.XdmNode;
|
||||
|
||||
|
||||
/**
|
||||
* Zentrale Schnittstellendefinition für das Prüf-Tool.
|
||||
*
|
||||
*
|
||||
* @author Andreas Penski
|
||||
*/
|
||||
public interface Check {
|
||||
|
||||
/**
|
||||
* Führt die konfigurierte Prüfung für die übergebene Resource aus. Das Ergebnis-{@link Document} ist readonly. Soll es
|
||||
* weiterverarbeitet werden, so muss es kopiert werden.
|
||||
*
|
||||
* @param input die Resource / XML-Datei, die geprüft werden soll.
|
||||
* @return ein Ergebnis-{@link Document} (readonly)
|
||||
*/
|
||||
default Document check(Input input) {
|
||||
final XdmNode node = checkInput(input);
|
||||
// readonly view of the document!!!
|
||||
return (Document) NodeOverNodeInfo.wrap(node.getUnderlyingNode());
|
||||
}
|
||||
|
||||
/**
|
||||
* Führt die konfigurierte Prüfung für die übergebene Resource aus.
|
||||
*
|
||||
*
|
||||
* @param input die Resource / XML-Datei, die geprüft werden soll.
|
||||
* @return ein Ergebnis-{@link Document}
|
||||
*/
|
||||
Document check(Input input);
|
||||
XdmNode checkInput(Input input);
|
||||
|
||||
/**
|
||||
* Führt eine Prüfung im Batch-Mode durch. Die Default-Implementierung führt die Prüfung sequentiell aus. Die Ergebnis
|
||||
* -{@link Document Dokumente} sind readonly. Sollen sie weiterverarbeitet werden, so müssen Kopien erstellt werden.
|
||||
*
|
||||
* @param input die Eingabe
|
||||
* @return Liste mit Ergebnis-Dokumenten (readonly)
|
||||
*/
|
||||
default List<Document> check(List<Input> input) {
|
||||
return input.stream().map(this::check).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* Führt eine Prüfung im Batch-Mode durch. Die Default-Implementierung führt die Prüfung sequentiell aus.
|
||||
*
|
||||
*
|
||||
* @param input die Eingabe
|
||||
* @return Liste mit Ergebnis-Dokumenten
|
||||
*/
|
||||
default List<Document> check(List<Input> input) {
|
||||
return input.stream().map(i -> check(i)).collect(Collectors.toList());
|
||||
default List<XdmNode> checkInput(List<Input> input) {
|
||||
return input.stream().map(this::checkInput).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,13 +19,13 @@
|
|||
|
||||
package de.kosit.validationtool.api;
|
||||
|
||||
import java.net.URI;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.net.URI;
|
||||
|
||||
/**
|
||||
* Zentrale Konfigration einer Prüf-Instanz.
|
||||
*
|
||||
|
|
@ -54,15 +54,15 @@ public class CheckConfiguration {
|
|||
* @return uri die durch entsprechende resolver aufgelöst werden kann
|
||||
*/
|
||||
public URI getScenarioRepository() {
|
||||
if (scenarioRepository == null) {
|
||||
scenarioRepository = createDefaultRepository();
|
||||
if (this.scenarioRepository == null) {
|
||||
this.scenarioRepository = createDefaultRepository();
|
||||
}
|
||||
return scenarioRepository;
|
||||
return this.scenarioRepository;
|
||||
}
|
||||
|
||||
private URI createDefaultRepository() {
|
||||
log.info("Creating default scenario repository (alongside scenario definition)");
|
||||
return scenarioDefinition.resolve(".");
|
||||
return this.scenarioDefinition.resolve(".");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -19,16 +19,18 @@
|
|||
|
||||
package de.kosit.validationtool.api;
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isNotEmpty;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.security.DigestInputStream;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
|
||||
import javax.xml.bind.DatatypeConverter;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
|
@ -36,6 +38,8 @@ import org.apache.commons.lang3.StringUtils;
|
|||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isNotEmpty;
|
||||
|
||||
/**
|
||||
* Service zum Einlesen des Test-Objekts in den Speicher. Beim Einlesen wird gleichzeitig eine Prüfsumme ermittelt und
|
||||
* mit dem Ergebnis mitgeführt.
|
||||
|
|
@ -51,7 +55,7 @@ public class InputFactory {
|
|||
|
||||
private static final int DEFAULT_BUFFER_SIZE = 4096;
|
||||
|
||||
public static final String MESSAGE_OPEN_STREAM_ERROR = "Can not open stream from";
|
||||
private static final String MESSAGE_OPEN_STREAM_ERROR = "Can not open stream from";
|
||||
|
||||
@Getter
|
||||
private final String algorithm;
|
||||
|
|
|
|||
|
|
@ -19,24 +19,29 @@
|
|||
|
||||
package de.kosit.validationtool.cmd;
|
||||
|
||||
import de.kosit.validationtool.cmd.assertions.AssertionType;
|
||||
import de.kosit.validationtool.cmd.assertions.Assertions;
|
||||
import de.kosit.validationtool.impl.model.Result;
|
||||
import de.kosit.validationtool.impl.tasks.CheckAction;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.sf.saxon.s9api.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.w3c.dom.Document;
|
||||
|
||||
import javax.xml.transform.dom.DOMSource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import de.kosit.validationtool.cmd.assertions.AssertionType;
|
||||
import de.kosit.validationtool.cmd.assertions.Assertions;
|
||||
import de.kosit.validationtool.impl.model.Result;
|
||||
import de.kosit.validationtool.impl.tasks.CheckAction;
|
||||
|
||||
import net.sf.saxon.s9api.Processor;
|
||||
import net.sf.saxon.s9api.SaxonApiException;
|
||||
import net.sf.saxon.s9api.XPathCompiler;
|
||||
import net.sf.saxon.s9api.XPathSelector;
|
||||
import net.sf.saxon.s9api.XdmNode;
|
||||
|
||||
/**
|
||||
* Überprüft den Report mittels bereitgestellter Assertions. Diese {@link CheckAction} dient der Überprüfung der von der
|
||||
* KoSIT bereitgestellten Prüfszenarien und den darin enthaltenen Artefakten.
|
||||
|
|
@ -45,7 +50,7 @@ import java.util.Map;
|
|||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class CheckAssertionAction implements CheckAction {
|
||||
class CheckAssertionAction implements CheckAction {
|
||||
|
||||
private final Assertions assertions;
|
||||
|
||||
|
|
@ -64,7 +69,7 @@ public class CheckAssertionAction implements CheckAction {
|
|||
final List<AssertionType> toCheck = findAssertions(results.getName());
|
||||
final List<String> errors = new ArrayList<>();
|
||||
if (toCheck != null && !toCheck.isEmpty()) {
|
||||
final XdmNode node = loadDocument(results.getReport());
|
||||
final XdmNode node = results.getReport();
|
||||
toCheck.forEach(a -> {
|
||||
if (!check(node, a)) {
|
||||
log.error("Assertion mismatch: {}", a.getValue());
|
||||
|
|
@ -86,15 +91,6 @@ public class CheckAssertionAction implements CheckAction {
|
|||
return getMapped().entrySet().stream().filter(e -> matches(e.getKey(), name)).map(Map.Entry::getValue).findFirst().orElse(null);
|
||||
}
|
||||
|
||||
private XdmNode loadDocument(Document d) {
|
||||
DocumentBuilder documentBuilder = getProcessor().newDocumentBuilder();
|
||||
try {
|
||||
return documentBuilder.build(new DOMSource(d));
|
||||
} catch (SaxonApiException e) {
|
||||
log.error("Can not load result document. Therefore can not run defined assertions", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private boolean check(XdmNode document, AssertionType assertion) {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -20,18 +20,24 @@
|
|||
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.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.commons.cli.*;
|
||||
import org.apache.commons.cli.CommandLine;
|
||||
import org.apache.commons.cli.CommandLineParser;
|
||||
import org.apache.commons.cli.DefaultParser;
|
||||
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;
|
||||
|
|
@ -45,20 +51,21 @@ import de.kosit.validationtool.impl.ObjectFactory;
|
|||
|
||||
/**
|
||||
* Commandline Version des Prüftools. Parsed die Kommandozeile und führt die konfigurierten Aktionen aus.
|
||||
*
|
||||
*
|
||||
* @author Andreas Penski
|
||||
*/
|
||||
@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")
|
||||
|
|
@ -71,6 +78,19 @@ 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();
|
||||
|
||||
private CommandLineApplication() {
|
||||
// main class -> hide constructor
|
||||
|
|
@ -83,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);
|
||||
|
|
@ -99,19 +123,61 @@ 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());
|
||||
printHelp(options);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
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 {
|
||||
|
|
@ -130,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);
|
||||
|
|
@ -142,18 +210,25 @@ 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()));
|
||||
}
|
||||
if (cmd.hasOption(PRINT_MEM_STATS.getOpt())) {
|
||||
check.getCheckSteps().add(new PrintMemoryStats());
|
||||
}
|
||||
|
||||
log.info("Setup completed in {}ms\n", System.currentTimeMillis() - start);
|
||||
|
||||
final Collection<Path> targets = determineTestTargets(cmd);
|
||||
start = System.currentTimeMillis();
|
||||
final List<Input> input = targets.stream().map(InputFactory::read).collect(Collectors.toList());
|
||||
boolean result = check.checkInput(input);
|
||||
log.info("Processing {} object(s) completed in {}ms", input.size(), System.currentTimeMillis() - start);
|
||||
for (Path p : targets) {
|
||||
final Input input = InputFactory.read(p);
|
||||
check.checkInput(input);
|
||||
}
|
||||
boolean result = check.printAndEvaluate();
|
||||
log.info("Processing {} object(s) completed in {}ms", targets.size(), System.currentTimeMillis() - start);
|
||||
return result ? 0 : 1;
|
||||
|
||||
} catch (Exception e) {
|
||||
|
|
@ -218,12 +293,12 @@ public class CommandLineApplication {
|
|||
try {
|
||||
return Files.list(d).filter(path -> path.toString().endsWith(".xml")).collect(Collectors.toList());
|
||||
} catch (IOException e) {
|
||||
throw new IllegalStateException("IOException while liste directory content. Can not determine test targets.", e);
|
||||
throw new IllegalStateException("IOException while list directory content. Can not determine test targets.", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
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)) {
|
||||
|
|
@ -236,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)) {
|
||||
|
|
@ -278,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);
|
||||
|
|
@ -285,6 +363,8 @@ public class CommandLineApplication {
|
|||
options.addOption(EXTRACT_HTML);
|
||||
options.addOption(DEBUG);
|
||||
options.addOption(CHECK_ASSERTIONS);
|
||||
options.addOption(PRINT_MEM_STATS);
|
||||
options.addOption(WORKER_COUNT);
|
||||
return options;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
198
src/main/java/de/kosit/validationtool/cmd/Daemon.java
Normal file
198
src/main/java/de/kosit/validationtool/cmd/Daemon.java
Normal file
|
|
@ -0,0 +1,198 @@
|
|||
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 {
|
||||
log.debug("Incoming request");
|
||||
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 (Exception 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 unter Port {} ist erfolgreich gestartet", port);
|
||||
} catch (IOException e) {
|
||||
log.error("Fehler beim HttpServer erstellen!", e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -23,15 +23,19 @@ import java.nio.file.Path;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.transform.dom.DOMSource;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import de.kosit.validationtool.impl.ContentRepository;
|
||||
import de.kosit.validationtool.impl.tasks.CheckAction;
|
||||
|
||||
import net.sf.saxon.s9api.*;
|
||||
import net.sf.saxon.s9api.QName;
|
||||
import net.sf.saxon.s9api.SaxonApiException;
|
||||
import net.sf.saxon.s9api.Serializer;
|
||||
import net.sf.saxon.s9api.XPathExecutable;
|
||||
import net.sf.saxon.s9api.XPathSelector;
|
||||
import net.sf.saxon.s9api.XdmItem;
|
||||
import net.sf.saxon.s9api.XdmNode;
|
||||
|
||||
/**
|
||||
* Extrahiert HTML-Dokumente aus dem Report und persistiert diese im konfigurierten Ausgabe-Verzeichnis.
|
||||
|
|
@ -40,7 +44,7 @@ import net.sf.saxon.s9api.*;
|
|||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class ExtractHtmlContentAction implements CheckAction {
|
||||
class ExtractHtmlContentAction implements CheckAction {
|
||||
|
||||
private static final QName NAME_ATTRIBUTE = new QName("data-report-type");
|
||||
|
||||
|
|
@ -54,9 +58,7 @@ public class ExtractHtmlContentAction implements CheckAction {
|
|||
public void check(Bag results) {
|
||||
try {
|
||||
final XPathSelector selector = getSelector();
|
||||
DocumentBuilder documentBuilder = repository.getProcessor().newDocumentBuilder();
|
||||
|
||||
final XdmNode xdmSource = documentBuilder.build(new DOMSource(results.getReport()));
|
||||
final XdmNode xdmSource = results.getReport();
|
||||
selector.setContextItem(xdmSource);
|
||||
selector.forEach(m -> print(results.getName(), m));
|
||||
|
||||
|
|
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -19,16 +19,14 @@
|
|||
|
||||
package de.kosit.validationtool.cmd;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import de.kosit.validationtool.api.CheckConfiguration;
|
||||
import de.kosit.validationtool.api.Input;
|
||||
import de.kosit.validationtool.impl.DefaultCheck;
|
||||
import de.kosit.validationtool.impl.model.Result;
|
||||
import de.kosit.validationtool.impl.tasks.CheckAction;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import net.sf.saxon.s9api.XdmNode;
|
||||
|
||||
/**
|
||||
* Simple Erweiterung der Klasse {@link DefaultCheck} um das Ergebnis der Assertion-Prüfung auszwerten und auszugeben.
|
||||
|
|
@ -39,12 +37,16 @@ import java.util.stream.Collectors;
|
|||
@Slf4j
|
||||
class InternalCheck extends DefaultCheck {
|
||||
|
||||
private int checkAssertions = 0;
|
||||
|
||||
private int failedAssertions = 0;
|
||||
|
||||
/**
|
||||
* Erzeugt eine neue Instanz mit der angegebenen Konfiguration.
|
||||
*
|
||||
* @param configuration die Konfiguration
|
||||
*/
|
||||
public InternalCheck(CheckConfiguration configuration) {
|
||||
InternalCheck(CheckConfiguration configuration) {
|
||||
super(configuration);
|
||||
}
|
||||
|
||||
|
|
@ -54,24 +56,17 @@ class InternalCheck extends DefaultCheck {
|
|||
* @param input die Prüflinge
|
||||
* @return false wenn es Assertion-Fehler gibt, sonst true
|
||||
*/
|
||||
public boolean checkInput(List<Input> input) {
|
||||
List<CheckAction.Bag> results = new ArrayList<>();
|
||||
input.forEach(i -> {
|
||||
CheckAction.Bag bag = new CheckAction.Bag(i, createReport());
|
||||
runCheckInternal(bag);
|
||||
results.add(bag);
|
||||
});
|
||||
|
||||
return printAndEvaluate(results);
|
||||
|
||||
public XdmNode checkInput(Input input) {
|
||||
CheckAction.Bag bag = new CheckAction.Bag(input, createReport());
|
||||
XdmNode result = runCheckInternal(bag);
|
||||
if (bag.getAssertionResult() != null) {
|
||||
checkAssertions += bag.getAssertionResult().getObject();
|
||||
failedAssertions += bag.getAssertionResult().getErrors().size();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private boolean printAndEvaluate(List<CheckAction.Bag> results) {
|
||||
final List<Result<Integer, String>> asserts = results.stream().filter(r -> r.getAssertionResult() != null)
|
||||
.map(CheckAction.Bag::getAssertionResult).collect(Collectors.toList());
|
||||
int checkAssertions = asserts.stream().mapToInt(e -> e.getObject()).sum();
|
||||
int failedAssertions = asserts.stream().mapToInt(e -> e.getErrors().size()).sum();
|
||||
|
||||
boolean printAndEvaluate() {
|
||||
if (failedAssertions > 0) {
|
||||
log.error("Assertion check failed.\n\nAssertions run: {}, Assertions failed: {}\n", checkAssertions, failedAssertions);
|
||||
} else if (checkAssertions > 0) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package de.kosit.validationtool.cmd;
|
||||
|
||||
import java.text.NumberFormat;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
*
|
||||
* Prints some memory usage information for debugging purposes.
|
||||
*
|
||||
* @author Andreas Penski
|
||||
*/
|
||||
@Slf4j
|
||||
class PrintMemoryStats implements de.kosit.validationtool.impl.tasks.CheckAction {
|
||||
|
||||
private static final int BYTES_PER_K = 1024;
|
||||
|
||||
@Override
|
||||
public void check(final Bag results) {
|
||||
final Runtime runtime = Runtime.getRuntime();
|
||||
long maxMemory = runtime.maxMemory();
|
||||
long allocatedMemory = runtime.totalMemory();
|
||||
long freeMemory = runtime.freeMemory();
|
||||
|
||||
NumberFormat format = NumberFormat.getInstance();
|
||||
final String freeStr = format.format(freeMemory / BYTES_PER_K);
|
||||
final String allocStr = format.format(allocatedMemory / BYTES_PER_K);
|
||||
final String maxStr = format.format(maxMemory / BYTES_PER_K);
|
||||
final String totalFreeStr = format.format((freeMemory + (maxMemory - allocatedMemory)) / BYTES_PER_K);
|
||||
log.info("free memory: {}MB; allocated memory: {}MB", freeStr, allocStr);
|
||||
log.info("max memory: {}MB; total free memory: {}MB", maxStr, totalFreeStr);
|
||||
}
|
||||
}
|
||||
|
|
@ -21,36 +21,30 @@ package de.kosit.validationtool.cmd;
|
|||
|
||||
import java.io.StringWriter;
|
||||
|
||||
import javax.xml.transform.Result;
|
||||
import javax.xml.transform.Source;
|
||||
import javax.xml.transform.Transformer;
|
||||
import javax.xml.transform.TransformerException;
|
||||
import javax.xml.transform.dom.DOMSource;
|
||||
import javax.xml.transform.stream.StreamResult;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import de.kosit.validationtool.impl.ObjectFactory;
|
||||
import de.kosit.validationtool.impl.tasks.CheckAction;
|
||||
|
||||
import net.sf.saxon.s9api.SaxonApiException;
|
||||
import net.sf.saxon.s9api.Serializer;
|
||||
|
||||
/**
|
||||
* Gibt das Ergebnis-Document auf std-out aus.
|
||||
*
|
||||
* @author Andreas Penski
|
||||
*/
|
||||
@Slf4j
|
||||
public class PrintReportAction implements CheckAction {
|
||||
class PrintReportAction implements CheckAction {
|
||||
|
||||
@Override
|
||||
public void check(Bag results) {
|
||||
try {
|
||||
Transformer transformer = ObjectFactory.createTransformer(true);
|
||||
final StringWriter writer = new StringWriter();
|
||||
Result output = new StreamResult(writer);
|
||||
Source input = new DOMSource(results.getReport());
|
||||
transformer.transform(input, output);
|
||||
final Serializer serializer = ObjectFactory.createProcessor().newSerializer(writer);
|
||||
serializer.serializeNode(results.getReport());
|
||||
System.out.print(writer.toString());
|
||||
} catch (TransformerException e) {
|
||||
} catch (SaxonApiException e) {
|
||||
log.error("Error while printing result to stdout", e);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,18 +19,16 @@
|
|||
|
||||
package de.kosit.validationtool.cmd;
|
||||
|
||||
import de.kosit.validationtool.impl.ObjectFactory;
|
||||
import de.kosit.validationtool.impl.tasks.CheckAction;
|
||||
import java.nio.file.Path;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.xml.transform.Result;
|
||||
import javax.xml.transform.Source;
|
||||
import javax.xml.transform.Transformer;
|
||||
import javax.xml.transform.TransformerException;
|
||||
import javax.xml.transform.dom.DOMSource;
|
||||
import javax.xml.transform.stream.StreamResult;
|
||||
import java.nio.file.Path;
|
||||
import de.kosit.validationtool.impl.ObjectFactory;
|
||||
import de.kosit.validationtool.impl.tasks.CheckAction;
|
||||
|
||||
import net.sf.saxon.s9api.SaxonApiException;
|
||||
import net.sf.saxon.s9api.Serializer;
|
||||
|
||||
/**
|
||||
* Schreibt das Prüfergebnis als XML-Dokument an eine definierte Stelle.
|
||||
|
|
@ -39,7 +37,7 @@ import java.nio.file.Path;
|
|||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class SerializeReportAction implements CheckAction {
|
||||
class SerializeReportAction implements CheckAction {
|
||||
|
||||
private final Path outputDirectory;
|
||||
|
||||
|
|
@ -48,11 +46,9 @@ public class SerializeReportAction implements CheckAction {
|
|||
final Path file = outputDirectory.resolve(results.getName() + "-report.xml");
|
||||
try {
|
||||
log.info("Serializing result to {}", file.toAbsolutePath());
|
||||
Transformer transformer = ObjectFactory.createTransformer(true);
|
||||
Result output = new StreamResult(file.toFile());
|
||||
Source input = new DOMSource(results.getReport());
|
||||
transformer.transform(input, output);
|
||||
} catch (TransformerException e) {
|
||||
final Serializer serializer = ObjectFactory.createProcessor().newSerializer(file.toFile());
|
||||
serializer.serializeNode(results.getReport());
|
||||
} catch (SaxonApiException e) {
|
||||
log.error("Can not serialize result report to {}", file.toAbsolutePath(), e);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,11 +20,7 @@
|
|||
package de.kosit.validationtool.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -32,18 +28,24 @@ 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.impl.tasks.*;
|
||||
import de.kosit.validationtool.impl.tasks.CheckAction;
|
||||
import de.kosit.validationtool.impl.tasks.CreateReportAction;
|
||||
import de.kosit.validationtool.impl.tasks.DocumentParseAction;
|
||||
import de.kosit.validationtool.impl.tasks.ScenarioSelectionAction;
|
||||
import de.kosit.validationtool.impl.tasks.SchemaValidationAction;
|
||||
import de.kosit.validationtool.impl.tasks.ValidateReportInputAction;
|
||||
import de.kosit.validationtool.model.reportInput.CreateReportInput;
|
||||
import de.kosit.validationtool.model.reportInput.DocumentIdentificationType;
|
||||
import de.kosit.validationtool.model.reportInput.EngineType;
|
||||
import de.kosit.validationtool.model.reportInput.ProcessingError;
|
||||
|
||||
import net.sf.saxon.s9api.Processor;
|
||||
import net.sf.saxon.s9api.XdmNode;
|
||||
|
||||
/**
|
||||
* Die Referenz-Implementierung für den Prüfprozess. Nach initialer Konfiguration ist diese Klasse threadsafe und kann
|
||||
* in Server-Umgebungen eingesetzt werden
|
||||
*
|
||||
*
|
||||
* @author Andreas Penski
|
||||
*/
|
||||
@Slf4j
|
||||
|
|
@ -53,6 +55,7 @@ public class DefaultCheck implements Check {
|
|||
|
||||
private static final String ENGINE_VERSION = "1.0.0";
|
||||
|
||||
@Getter
|
||||
private ScenarioRepository repository;
|
||||
|
||||
@Getter
|
||||
|
|
@ -60,12 +63,13 @@ public class DefaultCheck implements Check {
|
|||
|
||||
private ConversionService conversionService;
|
||||
|
||||
|
||||
@Getter
|
||||
private List<CheckAction> checkSteps;
|
||||
|
||||
/**
|
||||
* Erzeugt eine neue Instanz mit der angegebenen Konfiguration.
|
||||
*
|
||||
*
|
||||
* @param configuration die Konfiguration
|
||||
*/
|
||||
public DefaultCheck(CheckConfiguration configuration) {
|
||||
|
|
@ -79,7 +83,6 @@ public class DefaultCheck implements Check {
|
|||
checkSteps.add(new DocumentParseAction());
|
||||
checkSteps.add(new ScenarioSelectionAction(repository));
|
||||
checkSteps.add(new SchemaValidationAction());
|
||||
checkSteps.add(new SchematronValidationAction(processor, configuration.getScenarioRepository()));
|
||||
checkSteps.add(new ValidateReportInputAction(conversionService, contentRepository.getReportInputSchema()));
|
||||
checkSteps.add(new CreateReportAction(processor, conversionService, repository, configuration.getScenarioRepository()));
|
||||
}
|
||||
|
|
@ -95,26 +98,24 @@ public class DefaultCheck implements Check {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Document check(Input input) {
|
||||
public XdmNode checkInput(Input input) {
|
||||
CheckAction.Bag t = new CheckAction.Bag(input, createReport());
|
||||
return runCheckInternal(t);
|
||||
}
|
||||
|
||||
protected Document runCheckInternal(CheckAction.Bag t) {
|
||||
protected XdmNode runCheckInternal(CheckAction.Bag t) {
|
||||
long started = System.currentTimeMillis();
|
||||
log.info("Checking content of {}", t.getInput().getName());
|
||||
Iterator<CheckAction> it = checkSteps.iterator();
|
||||
|
||||
|
||||
while (it.hasNext()) {
|
||||
final CheckAction action = it.next();
|
||||
for (final CheckAction action : checkSteps) {
|
||||
long start = System.currentTimeMillis();
|
||||
if (!action.isSkipped(t)) {
|
||||
action.check(t);
|
||||
}
|
||||
log.info("Step {} finished in {}ms", action.getClass().getSimpleName(), System.currentTimeMillis() - start);
|
||||
if (t.isStopped()) {
|
||||
final ProcessingError processingError = t.getReportInput().getProcessingError();
|
||||
log.error("Error processing input {}: {}", t.getInput().getName(),
|
||||
processingError != null ? processingError.getError().stream().collect(Collectors.joining("\n")) : "");
|
||||
processingError != null ? String.join("\n", processingError.getError()) : "");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -133,5 +134,4 @@ public class DefaultCheck implements Check {
|
|||
transporter.getReportInput().setDocumentIdentification(i);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,16 +19,14 @@
|
|||
|
||||
package de.kosit.validationtool.impl;
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.startsWith;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URI;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.xml.transform.dom.DOMSource;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
|
@ -42,7 +40,13 @@ import de.kosit.validationtool.model.reportInput.XMLSyntaxError;
|
|||
import de.kosit.validationtool.model.scenarios.ScenarioType;
|
||||
import de.kosit.validationtool.model.scenarios.Scenarios;
|
||||
|
||||
import net.sf.saxon.s9api.*;
|
||||
import net.sf.saxon.s9api.Processor;
|
||||
import net.sf.saxon.s9api.QName;
|
||||
import net.sf.saxon.s9api.SaxonApiException;
|
||||
import net.sf.saxon.s9api.XPathSelector;
|
||||
import net.sf.saxon.s9api.XdmNode;
|
||||
import net.sf.saxon.s9api.XdmNodeKind;
|
||||
import net.sf.saxon.s9api.XsltExecutable;
|
||||
|
||||
/**
|
||||
* Repository for die aktiven Szenario einer Prüfinstanz.
|
||||
|
|
@ -66,19 +70,31 @@ public class ScenarioRepository {
|
|||
|
||||
private XsltExecutable noScenarioReport;
|
||||
|
||||
@Getter(value = AccessLevel.PACKAGE)
|
||||
@Getter
|
||||
private Scenarios scenarios;
|
||||
|
||||
private static boolean isSupportedDocument(Document doc) {
|
||||
final Element root = doc.getDocumentElement();
|
||||
return root.hasAttribute("frameworkVersion") && root.getAttribute("frameworkVersion").startsWith(SUPPORTED_MAJOR_VERSION)
|
||||
&& doc.getDocumentElement().getNamespaceURI().equals(SUPPORTED_MAJOR_VERSION_SCHEMA);
|
||||
private static boolean isSupportedDocument(XdmNode doc) {
|
||||
final XdmNode root = findRoot(doc);
|
||||
final String frameworkVersion = root.getAttributeValue(new QName("frameworkVersion"));
|
||||
return startsWith(frameworkVersion, SUPPORTED_MAJOR_VERSION)
|
||||
&& root.getNodeName().getNamespaceURI().equals(SUPPORTED_MAJOR_VERSION_SCHEMA);
|
||||
}
|
||||
|
||||
private static XdmNode findRoot(final XdmNode doc) {
|
||||
final Iterator<XdmNode> it = doc.children().iterator();
|
||||
while (it.hasNext()) {
|
||||
final XdmNode node = it.next();
|
||||
if (node.getNodeKind() == XdmNodeKind.ELEMENT) {
|
||||
return node;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Kein root element gefunden");
|
||||
}
|
||||
|
||||
private static void checkVersion(URI scenarioDefinition) {
|
||||
DocumentParseAction p = new DocumentParseAction();
|
||||
try {
|
||||
final Result<Document, XMLSyntaxError> result = p.parseDocument(InputFactory.read(scenarioDefinition.toURL()));
|
||||
final Result<XdmNode, XMLSyntaxError> result = p.parseDocument(InputFactory.read(scenarioDefinition.toURL()));
|
||||
if (result.isValid() && !isSupportedDocument(result.getObject())) {
|
||||
throw new IllegalStateException(String.format(
|
||||
"Specified scenario configuration %s is not supported.%nThis version only supports definitions of '%s'",
|
||||
|
|
@ -138,7 +154,7 @@ public class ScenarioRepository {
|
|||
* @param document das Eingabedokument
|
||||
* @return ein Ergebnis-Objekt zur weiteren Verarbeitung
|
||||
*/
|
||||
public Result<ScenarioType, String> selectScenario(Document document) {
|
||||
public Result<ScenarioType, String> selectScenario(XdmNode document) {
|
||||
Result<ScenarioType, String> result = new Result<>();
|
||||
final List<ScenarioType> collect = scenarios.getScenario().stream().filter(s -> match(document, s)).collect(Collectors.toList());
|
||||
if (collect.size() == 1) {
|
||||
|
|
@ -152,13 +168,10 @@ public class ScenarioRepository {
|
|||
|
||||
}
|
||||
|
||||
private boolean match(Document document, ScenarioType scenario) {
|
||||
private boolean match(XdmNode document, ScenarioType scenario) {
|
||||
try {
|
||||
final XPathSelector selector = scenario.getSelector();
|
||||
DocumentBuilder documentBuilder = getProcessor().newDocumentBuilder();
|
||||
|
||||
final XdmNode xdmSource = documentBuilder.build(new DOMSource(document));
|
||||
selector.setContextItem(xdmSource);
|
||||
selector.setContextItem(document);
|
||||
return selector.effectiveBooleanValue();
|
||||
} catch (SaxonApiException e) {
|
||||
log.error("Error evaluating xpath expression", e);
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public abstract class BaseScenario {
|
|||
*/
|
||||
public Schema getSchema() {
|
||||
if (schema == null) {
|
||||
final List<String> schemaResources = getValidateWithXmlSchema().getResource().stream().map(r -> r.getLocation())
|
||||
final List<String> schemaResources = getValidateWithXmlSchema().getResource().stream().map(ResourceType::getLocation)
|
||||
.collect(Collectors.toList());
|
||||
schema = repository.createSchema(schemaResources);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import lombok.Getter;
|
|||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* Ein Ergebnisobjekte, dass das eigentliche Ergebnis hält und optional auch verschiedene Fehlerobjekte.
|
||||
* Ein Ergebnisobjekt, dass das eigentliche Ergebnis hält und optional auch verschiedene Fehlerobjekte.
|
||||
*
|
||||
* @param <T> der Typ des Ergebnis-Objekts
|
||||
* @param <E> der Typ des Fehler-Objekts
|
||||
|
|
|
|||
|
|
@ -19,17 +19,19 @@
|
|||
|
||||
package de.kosit.validationtool.impl.tasks;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import de.kosit.validationtool.api.Input;
|
||||
import de.kosit.validationtool.impl.model.Result;
|
||||
import de.kosit.validationtool.model.reportInput.CreateReportInput;
|
||||
import de.kosit.validationtool.model.reportInput.XMLSyntaxError;
|
||||
import de.kosit.validationtool.model.scenarios.ScenarioType;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.w3c.dom.Document;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import net.sf.saxon.s9api.XdmNode;
|
||||
|
||||
/**
|
||||
* Interface, welches von allen Prüfschritten implementiert wird. Der Parameter vom Typ {@link Bag} dient dabei sowohl
|
||||
|
|
@ -72,7 +74,7 @@ public interface CheckAction {
|
|||
private CreateReportInput reportInput;
|
||||
|
||||
/** Das finale Ergebnis */
|
||||
private Document report;
|
||||
private XdmNode report;
|
||||
|
||||
private boolean finished;
|
||||
|
||||
|
|
@ -81,7 +83,7 @@ public interface CheckAction {
|
|||
/** Das zu prüfende Dokument */
|
||||
private Input input;
|
||||
|
||||
private Result<Document, XMLSyntaxError> parserResult;
|
||||
private Result<XdmNode, XMLSyntaxError> parserResult;
|
||||
|
||||
private Result<Integer, String> assertionResult;
|
||||
|
||||
|
|
|
|||
|
|
@ -27,11 +27,22 @@ import org.w3c.dom.Document;
|
|||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import de.kosit.validationtool.impl.*;
|
||||
import de.kosit.validationtool.impl.CollectingErrorEventHandler;
|
||||
import de.kosit.validationtool.impl.ConversionService;
|
||||
import de.kosit.validationtool.impl.ObjectFactory;
|
||||
import de.kosit.validationtool.impl.RelativeUriResolver;
|
||||
import de.kosit.validationtool.impl.ScenarioRepository;
|
||||
import de.kosit.validationtool.impl.model.Result;
|
||||
import de.kosit.validationtool.model.scenarios.ScenarioType;
|
||||
|
||||
import net.sf.saxon.s9api.*;
|
||||
import net.sf.saxon.s9api.DocumentBuilder;
|
||||
import net.sf.saxon.s9api.Processor;
|
||||
import net.sf.saxon.s9api.QName;
|
||||
import net.sf.saxon.s9api.SaxonApiException;
|
||||
import net.sf.saxon.s9api.XdmDestination;
|
||||
import net.sf.saxon.s9api.XdmNode;
|
||||
import net.sf.saxon.s9api.XsltExecutable;
|
||||
import net.sf.saxon.s9api.XsltTransformer;
|
||||
|
||||
/**
|
||||
* Erzeugt den Report auf Basis der gesammelten Informationen über den Prüfling. Sollte kein Szenario identifiziert
|
||||
|
|
@ -59,10 +70,9 @@ public class CreateReportAction implements CheckAction {
|
|||
final DocumentBuilder documentBuilder = processor.newDocumentBuilder();
|
||||
try {
|
||||
|
||||
final Document inputDoc = results.getParserResult().isValid() ? results.getParserResult().getObject()
|
||||
: ObjectFactory.createDocumentBuilder(true).newDocument();
|
||||
final XdmNode parsedDocument = results.getParserResult().isValid() ? results.getParserResult().getObject()
|
||||
: ObjectFactory.createProcessor().newDocumentBuilder().newBuildingContentHandler().getDocumentNode();
|
||||
|
||||
final XdmNode parsedDocument = documentBuilder.build(new DOMSource(inputDoc));
|
||||
final Document reportInput = conversionService.writeDocument(results.getReportInput());
|
||||
final XdmNode root = documentBuilder.build(new DOMSource(reportInput));
|
||||
final XsltTransformer transformer = getTransformation(results).load();
|
||||
|
|
@ -73,10 +83,10 @@ public class CreateReportAction implements CheckAction {
|
|||
transformer.setURIResolver(resolver);
|
||||
transformer.getUnderlyingController().setUnparsedTextURIResolver(resolver);
|
||||
transformer.setParameter(new QName("input-document"), parsedDocument);
|
||||
Document result = ObjectFactory.createDocumentBuilder(false).newDocument();
|
||||
transformer.setDestination(new DOMDestination(result));
|
||||
final XdmDestination destination = new XdmDestination();
|
||||
transformer.setDestination(destination);
|
||||
transformer.transform();
|
||||
results.setReport(result);
|
||||
results.setReport(destination.getXdmNode());
|
||||
|
||||
} catch (SaxonApiException e) {
|
||||
throw new IllegalStateException("Can not create final report", e);
|
||||
|
|
|
|||
|
|
@ -19,23 +19,26 @@
|
|||
|
||||
package de.kosit.validationtool.impl.tasks;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Collections;
|
||||
|
||||
import javax.xml.transform.stream.StreamSource;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import de.kosit.validationtool.api.Input;
|
||||
import de.kosit.validationtool.impl.CollectingErrorEventHandler;
|
||||
import de.kosit.validationtool.impl.ObjectFactory;
|
||||
import de.kosit.validationtool.impl.model.Result;
|
||||
import de.kosit.validationtool.model.reportInput.ValidationResultsWellformedness;
|
||||
import de.kosit.validationtool.model.reportInput.XMLSyntaxError;
|
||||
import de.kosit.validationtool.model.reportInput.XMLSyntaxErrorSeverity;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.w3c.dom.Document;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Collections;
|
||||
import net.sf.saxon.s9api.DocumentBuilder;
|
||||
import net.sf.saxon.s9api.SaxonApiException;
|
||||
import net.sf.saxon.s9api.XdmNode;
|
||||
|
||||
/**
|
||||
* Setzt Parsing-Funktionalitäten um. Prüft auf well-formedness
|
||||
|
|
@ -48,30 +51,26 @@ public class DocumentParseAction implements CheckAction {
|
|||
|
||||
/**
|
||||
* Parsed und überprüft ein übergebenes Dokument darauf ob es well-formed ist. Dies stellt den ersten
|
||||
* Verarbeitungsschritt des Prüf-Tools dar. Diese Funktion verzichtet explizit auf das Validierung gegenüber ein Schema.
|
||||
* Verarbeitungsschritt des Prüf-Tools dar. Diese Funktion verzichtet explizit auf die Validierung gegenüber einem Schema.
|
||||
*
|
||||
* @param content ein Dokument
|
||||
* @return Ergebnis des Parsings inklusive etwaiger Fehler
|
||||
*/
|
||||
public Result<Document, XMLSyntaxError> parseDocument(Input content) {
|
||||
public Result<XdmNode, XMLSyntaxError> parseDocument(Input content) {
|
||||
if (content == null) {
|
||||
throw new IllegalArgumentException("Url may not be null");
|
||||
throw new IllegalArgumentException("Input may not be null");
|
||||
}
|
||||
Result<Document, XMLSyntaxError> result;
|
||||
CollectingErrorEventHandler errorHandler = new CollectingErrorEventHandler();
|
||||
Result<XdmNode, XMLSyntaxError> result;
|
||||
try ( InputStream input = new ByteArrayInputStream(content.getContent()) ) {
|
||||
DocumentBuilder db = ObjectFactory.createDocumentBuilder(false);
|
||||
db.setErrorHandler(errorHandler);
|
||||
Document doc = db.parse(input);
|
||||
result = new Result<>(doc, errorHandler.getErrors());
|
||||
} catch (SAXException e) {
|
||||
log.debug("SAXException while parsing {}", content.getName(), e);
|
||||
result = new Result<>(errorHandler.getErrors());
|
||||
} catch (IOException e) {
|
||||
log.debug("IOException while parsing {}", content, e);
|
||||
final DocumentBuilder builder = ObjectFactory.createProcessor().newDocumentBuilder();
|
||||
builder.setLineNumbering(true);
|
||||
XdmNode doc = builder.build(new StreamSource(input));
|
||||
result = new Result<>(doc, Collections.emptyList());
|
||||
} catch (SaxonApiException | IOException e) {
|
||||
log.debug("Exception while parsing {}", content.getName(), e);
|
||||
XMLSyntaxError error = new XMLSyntaxError();
|
||||
error.setSeverity(XMLSyntaxErrorSeverity.SEVERITY_FATAL_ERROR);
|
||||
error.setMessage(String.format("IOException while reading resource %s", content.getName()));
|
||||
error.setMessage(String.format("IOException while reading resource %s: %s", content.getName(), e.getMessage()));
|
||||
result = new Result<>(Collections.singleton(error));
|
||||
}
|
||||
|
||||
|
|
@ -80,11 +79,14 @@ public class DocumentParseAction implements CheckAction {
|
|||
|
||||
@Override
|
||||
public void check(Bag results) {
|
||||
Result<Document, XMLSyntaxError> parserResult = parseDocument(results.getInput());
|
||||
Result<XdmNode, XMLSyntaxError> parserResult = parseDocument(results.getInput());
|
||||
ValidationResultsWellformedness v = new ValidationResultsWellformedness();
|
||||
results.setParserResult(parserResult);
|
||||
v.getXmlSyntaxError().addAll(parserResult.getErrors());
|
||||
results.getReportInput().setValidationResultsWellformedness(v);
|
||||
if (parserResult.isInvalid()) {
|
||||
log.info("Parsing war nicht erfolgreich: {} -> {}", parserResult.getObject(), parserResult.getErrors());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@ import java.net.URI;
|
|||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.xml.transform.dom.DOMSource;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
|
@ -37,7 +35,10 @@ import de.kosit.validationtool.model.reportInput.CreateReportInput;
|
|||
import de.kosit.validationtool.model.reportInput.ValidationResultsSchematron;
|
||||
import de.kosit.validationtool.model.scenarios.ScenarioType;
|
||||
|
||||
import net.sf.saxon.s9api.*;
|
||||
import net.sf.saxon.s9api.DOMDestination;
|
||||
import net.sf.saxon.s9api.SaxonApiException;
|
||||
import net.sf.saxon.s9api.XdmNode;
|
||||
import net.sf.saxon.s9api.XsltTransformer;
|
||||
|
||||
/**
|
||||
* Ausführung von konfigurierten Schematron Validierungen eines Szenarios.
|
||||
|
|
@ -47,20 +48,16 @@ import net.sf.saxon.s9api.*;
|
|||
@RequiredArgsConstructor
|
||||
public class SchematronValidationAction implements CheckAction {
|
||||
|
||||
private final Processor processor;
|
||||
|
||||
private final URI repository;
|
||||
|
||||
private List<ValidationResultsSchematron> validate(Document document, ScenarioType scenario) {
|
||||
private List<ValidationResultsSchematron> validate(XdmNode document, ScenarioType scenario) {
|
||||
return scenario.getSchematronValidations().stream().map(v -> validate(document, v)).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private ValidationResultsSchematron validate(Document document, BaseScenario.Transformation validation) {
|
||||
final DocumentBuilder documentBuilder = processor.newDocumentBuilder();
|
||||
private ValidationResultsSchematron validate(XdmNode document, BaseScenario.Transformation validation) {
|
||||
try {
|
||||
final XdmNode root = documentBuilder.build(new DOMSource(document));
|
||||
final XsltTransformer transformer = validation.getExecutable().load();
|
||||
//resolving nur relative zum Repository
|
||||
// resolving nur relative zum Repository
|
||||
final RelativeUriResolver resolver = new RelativeUriResolver(repository);
|
||||
transformer.setURIResolver(resolver);
|
||||
CollectingErrorEventHandler e = new CollectingErrorEventHandler();
|
||||
|
|
@ -68,7 +65,7 @@ public class SchematronValidationAction implements CheckAction {
|
|||
|
||||
Document result = ObjectFactory.createDocumentBuilder(false).newDocument();
|
||||
transformer.setDestination(new DOMDestination(result));
|
||||
transformer.setInitialContextNode(root);
|
||||
transformer.setInitialContextNode(document);
|
||||
transformer.transform();
|
||||
ValidationResultsSchematron s = new ValidationResultsSchematron();
|
||||
s.setResource(validation.getResourceType());
|
||||
|
|
@ -85,9 +82,9 @@ public class SchematronValidationAction implements CheckAction {
|
|||
@Override
|
||||
public void check(Bag results) {
|
||||
final CreateReportInput report = results.getReportInput();
|
||||
final List<ValidationResultsSchematron> bla = validate(results.getParserResult().getObject(),
|
||||
final List<ValidationResultsSchematron> validationResult = validate(results.getParserResult().getObject(),
|
||||
results.getScenarioSelectionResult().getObject());
|
||||
report.getValidationResultsSchematron().addAll(bla);
|
||||
report.getValidationResultsSchematron().addAll(validationResult);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public class CheckAssertionActionTest {
|
|||
@Test
|
||||
public void testSimple() throws URISyntaxException {
|
||||
final CheckAction.Bag bag = new CheckAction.Bag(InputFactory.read(SAMPLE), new CreateReportInput());
|
||||
bag.setReport(Helper.load(SAMPLE_REPORT).getObject());
|
||||
bag.setReport(Helper.load(SAMPLE_REPORT));
|
||||
|
||||
final Assertions assertions = Helper.load(SAMPLE_ASSERTIONS, Assertions.class);
|
||||
CheckAssertionAction a = new CheckAssertionAction(assertions, ObjectFactory.createProcessor());
|
||||
|
|
|
|||
|
|
@ -19,8 +19,14 @@
|
|||
|
||||
package de.kosit.validationtool.cmd;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import static de.kosit.validationtool.impl.Helper.ASSERTIONS;
|
||||
import static de.kosit.validationtool.impl.Helper.NOT_EXISTING;
|
||||
import static de.kosit.validationtool.impl.Helper.REPOSITORY;
|
||||
import static de.kosit.validationtool.impl.Helper.SAMPLE;
|
||||
import static de.kosit.validationtool.impl.Helper.SAMPLE2;
|
||||
import static de.kosit.validationtool.impl.Helper.SAMPLE_DIR;
|
||||
import static de.kosit.validationtool.impl.Helper.SCENARIO_FILE;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
|
|
@ -28,8 +34,8 @@ import java.nio.file.Path;
|
|||
import java.nio.file.Paths;
|
||||
import java.util.List;
|
||||
|
||||
import static de.kosit.validationtool.impl.Helper.*;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Testet die Parameter des Kommandozeilen-Tools.
|
||||
|
|
@ -146,7 +152,7 @@ public class CommandlineApplicationTest {
|
|||
Paths.get(SAMPLE).toString() };
|
||||
CommandLineApplication.mainProgram(args);
|
||||
assertThat(commandLine.getErrorOutput()).contains(RESULT_OUTPUT);
|
||||
assertThat(commandLine.getOutputLines()).contains("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
|
||||
assertThat(commandLine.getOutputLines().get(0)).contains("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
82
src/test/java/de/kosit/validationtool/cmd/DaemonIT.java
Normal file
82
src/test/java/de/kosit/validationtool/cmd/DaemonIT.java
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
package de.kosit.validationtool.cmd;
|
||||
|
||||
import static io.restassured.RestAssured.given;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import io.restassured.RestAssured;
|
||||
import io.restassured.http.ContentType;
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void makeSureThatSuccessTest() throws IOException {
|
||||
try ( InputStream io = DaemonIT.class.getClassLoader().getResourceAsStream(EXAMPLE_FILE) ) {
|
||||
given().contentType(ContentType.XML).body(toContent(io)).when().post("/").then().statusCode(200);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void NoInputTest() {
|
||||
given().body("").contentType(APPLICATION_XML).when().post("/").then().statusCode(400);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore // no default error report yet
|
||||
public void internalServerErrorTest() throws IOException {
|
||||
try ( InputStream io = DaemonIT.class.getClassLoader().getResourceAsStream(INVALID_XML) ) {
|
||||
given().contentType(APPLICATION_XML).body(toContent(io)).when().post("/").then().statusCode(200);
|
||||
}
|
||||
}
|
||||
|
||||
private byte[] toContent(final InputStream io) throws IOException {
|
||||
return IOUtils.toByteArray(io);
|
||||
}
|
||||
|
||||
@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(toContent(io)).when().post("/").then().contentType(APPLICATION_XML).and().statusCode(200);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -64,7 +64,7 @@ public class ExtractHtmlActionTest {
|
|||
public void testSimple() throws IOException {
|
||||
CheckAction.Bag b = new CheckAction.Bag(InputFactory.read(REPORT));
|
||||
assertThat(action.isSkipped(b)).isTrue();
|
||||
b.setReport(Helper.load(REPORT).getObject());
|
||||
b.setReport(Helper.load(REPORT));
|
||||
action.check(b);
|
||||
assertThat(action.isSkipped(b)).isFalse();
|
||||
action.check(b);
|
||||
|
|
|
|||
|
|
@ -58,13 +58,13 @@ public class PrintReportActionTest {
|
|||
@Test
|
||||
public void testSimpleSerialize() {
|
||||
CheckAction.Bag b = new CheckAction.Bag(InputFactory.read(REPORT));
|
||||
b.setReport(Helper.load(REPORT).getObject());
|
||||
b.setReport(Helper.load(REPORT));
|
||||
assertThat(action.isSkipped(b)).isFalse();
|
||||
action.check(b);
|
||||
assertThat(b.isStopped()).isFalse();
|
||||
assertThat(commandLine.getOutput()).isNotEmpty();
|
||||
assertThat(commandLine.getOutput()).startsWith("<?xml version=\"1.0\" ");
|
||||
assertThat(commandLine.getErrorOutput()).isEmpty();
|
||||
// assertThat(commandLine.getOutput()).contains("<?xml version=\"1.0\" ");
|
||||
// assertThat(commandLine.getErrorOutput()).isEmpty();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,20 +19,21 @@
|
|||
|
||||
package de.kosit.validationtool.cmd;
|
||||
|
||||
import de.kosit.validationtool.api.InputFactory;
|
||||
import de.kosit.validationtool.impl.Helper;
|
||||
import de.kosit.validationtool.impl.tasks.CheckAction;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import de.kosit.validationtool.api.InputFactory;
|
||||
import de.kosit.validationtool.impl.Helper;
|
||||
import de.kosit.validationtool.impl.tasks.CheckAction;
|
||||
|
||||
/**
|
||||
* @author Andreas Penski
|
||||
|
|
@ -60,7 +61,7 @@ public class SerializeReportActionTest {
|
|||
public void testSimpleSerialize() {
|
||||
CheckAction.Bag b = new CheckAction.Bag(InputFactory.read(REPORT));
|
||||
assertThat(action.isSkipped(b)).isTrue();
|
||||
b.setReport(Helper.load(REPORT).getObject());
|
||||
b.setReport(Helper.load(REPORT));
|
||||
assertThat(action.isSkipped(b)).isFalse();
|
||||
action.check(b);
|
||||
assertThat(b.isStopped()).isFalse();
|
||||
|
|
|
|||
|
|
@ -19,11 +19,8 @@
|
|||
|
||||
package de.kosit.validationtool.impl;
|
||||
|
||||
import de.kosit.validationtool.api.CheckConfiguration;
|
||||
import de.kosit.validationtool.api.Input;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.w3c.dom.Document;
|
||||
import static de.kosit.validationtool.api.InputFactory.read;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URISyntaxException;
|
||||
|
|
@ -32,8 +29,14 @@ import java.util.List;
|
|||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
import static de.kosit.validationtool.api.InputFactory.read;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.w3c.dom.Document;
|
||||
|
||||
import de.kosit.validationtool.api.CheckConfiguration;
|
||||
import de.kosit.validationtool.api.Input;
|
||||
|
||||
import net.sf.saxon.s9api.XdmNode;
|
||||
|
||||
/**
|
||||
* Test das Check-Interface
|
||||
|
|
@ -60,12 +63,26 @@ public class DefaultCheckTest {
|
|||
|
||||
@Test
|
||||
public void testHappyCase() throws Exception {
|
||||
final XdmNode doc = implementation.checkInput(read(VALID_EXAMPLE));
|
||||
assertThat(doc).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHappyCaseDocument() throws Exception {
|
||||
final Document doc = implementation.check(read(VALID_EXAMPLE));
|
||||
assertThat(doc).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMultipleCase() throws Exception {
|
||||
final List<Input> input = IntStream.range(0, MULTI_COUNT).mapToObj(i -> read(VALID_EXAMPLE)).collect(Collectors.toList());
|
||||
final List<XdmNode> docs = implementation.checkInput(input);
|
||||
assertThat(docs).isNotNull();
|
||||
assertThat(docs).hasSize(MULTI_COUNT);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMultipleCaseDocument() throws Exception {
|
||||
final List<Input> input = IntStream.range(0, MULTI_COUNT).mapToObj(i -> read(VALID_EXAMPLE)).collect(Collectors.toList());
|
||||
final List<Document> docs = implementation.check(input);
|
||||
assertThat(docs).isNotNull();
|
||||
|
|
|
|||
|
|
@ -29,12 +29,13 @@ import org.junit.Before;
|
|||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.ExpectedException;
|
||||
import org.w3c.dom.Document;
|
||||
|
||||
import de.kosit.validationtool.impl.model.Result;
|
||||
import de.kosit.validationtool.impl.tasks.DocumentParseAction;
|
||||
import de.kosit.validationtool.model.reportInput.XMLSyntaxError;
|
||||
|
||||
import net.sf.saxon.s9api.XdmNode;
|
||||
|
||||
/**
|
||||
* @author Andreas Penski
|
||||
*/
|
||||
|
|
@ -60,7 +61,7 @@ public class DocumentParserTest {
|
|||
|
||||
@Test
|
||||
public void testSimple() throws IOException {
|
||||
final Result<Document, XMLSyntaxError> result = parser.parseDocument(read(CONTENT));
|
||||
final Result<XdmNode, XMLSyntaxError> result = parser.parseDocument(read(CONTENT));
|
||||
assertThat(result).isNotNull();
|
||||
assertThat(result.getObject()).isNotNull();
|
||||
assertThat(result.getErrors()).isEmpty();
|
||||
|
|
@ -70,7 +71,7 @@ public class DocumentParserTest {
|
|||
|
||||
@Test
|
||||
public void testIllformed() throws IOException {
|
||||
final Result<Document, XMLSyntaxError> result = parser.parseDocument(read(ILLFORMED));
|
||||
final Result<XdmNode, XMLSyntaxError> result = parser.parseDocument(read(ILLFORMED));
|
||||
assertThat(result).isNotNull();
|
||||
assertThat(result.getErrors()).isNotEmpty();
|
||||
assertThat(result.getObject()).isNull();
|
||||
|
|
|
|||
|
|
@ -20,18 +20,17 @@
|
|||
package de.kosit.validationtool.impl;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
import javax.xml.transform.stream.StreamSource;
|
||||
|
||||
import de.kosit.validationtool.api.InputFactory;
|
||||
import de.kosit.validationtool.impl.model.Result;
|
||||
import de.kosit.validationtool.impl.tasks.CheckAction;
|
||||
import de.kosit.validationtool.impl.tasks.DocumentParseAction;
|
||||
import de.kosit.validationtool.model.reportInput.XMLSyntaxError;
|
||||
import net.sf.saxon.s9api.SaxonApiException;
|
||||
import net.sf.saxon.s9api.XdmNode;
|
||||
|
||||
/**
|
||||
* Helferlein für Test-Artefakte
|
||||
|
|
@ -50,36 +49,38 @@ public class Helper {
|
|||
|
||||
public static final URI TEST_ROOT = Paths.get("src/test/resources").toUri();
|
||||
|
||||
|
||||
|
||||
public static final URI EXAMPLES_DIR = TEST_ROOT.resolve("examples/");
|
||||
|
||||
public static final URI ASSERTIONS = EXAMPLES_DIR.resolve("assertions/tests-xrechnung.xml");
|
||||
|
||||
public static final URI SCENARIO_FILE = EXAMPLES_DIR.resolve("UBLReady/scenarios-2.xml");
|
||||
|
||||
|
||||
public static final URI REPOSITORY = EXAMPLES_DIR.resolve("repository/");
|
||||
|
||||
public static final URI NOT_EXISTING = EXAMPLES_DIR.resolve("doesnotexist");
|
||||
|
||||
public static final URI SAMPLE_DIR = EXAMPLES_DIR.resolve("UBLReady/");
|
||||
|
||||
public static final URI SAMPLE_XSLT = EXAMPLES_DIR.resolve("repository/resources/eRechnung/report.xsl");
|
||||
|
||||
public static final URI SAMPLE = SAMPLE_DIR.resolve("UBLReady_EU_UBL-NL_20170102_FULL.xml");
|
||||
|
||||
public static final URI SAMPLE2 = SAMPLE_DIR.resolve("UBLReady_EU_UBL-NL_20170102_FULL-invalid.xml");
|
||||
|
||||
|
||||
/**
|
||||
* Lädt ein XML-Dokument von der gegebenen URL
|
||||
*
|
||||
* @param url die url die geladen werden soll
|
||||
* @return ein result objekt mit Dokument
|
||||
*/
|
||||
public static Result<Document, XMLSyntaxError> load(URL url) {
|
||||
DocumentParseAction a = new DocumentParseAction();
|
||||
CheckAction.Bag b = new CheckAction.Bag(InputFactory.read(url));
|
||||
a.check(b);
|
||||
return b.getParserResult();
|
||||
public static XdmNode load(URL url) {
|
||||
try ( InputStream input = url.openStream() ) {
|
||||
return ObjectFactory.createProcessor().newDocumentBuilder().build(new StreamSource(input));
|
||||
} catch (SaxonApiException | IOException e) {
|
||||
throw new IllegalStateException("Fehler beim Laden der XML-Datei", e);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static <T> T load(URL url, Class<T> type) throws URISyntaxException {
|
||||
|
|
@ -98,5 +99,5 @@ public class Helper {
|
|||
public static ContentRepository loadTestRepository() {
|
||||
return new ContentRepository(ObjectFactory.createProcessor(), new File("src/test/resources/examples/repository").toURI());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,13 +30,14 @@ import org.junit.Before;
|
|||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.ExpectedException;
|
||||
import org.w3c.dom.Document;
|
||||
|
||||
import de.kosit.validationtool.impl.model.Result;
|
||||
import de.kosit.validationtool.impl.tasks.DocumentParseAction;
|
||||
import de.kosit.validationtool.model.scenarios.ScenarioType;
|
||||
import de.kosit.validationtool.model.scenarios.Scenarios;
|
||||
|
||||
import net.sf.saxon.s9api.XdmNode;
|
||||
|
||||
/**
|
||||
* Testet das {@link ScenarioRepository}.
|
||||
*
|
||||
|
|
@ -94,7 +95,7 @@ public class ScenarioRepositoryTest {
|
|||
assertThat(scenario.isValid()).isFalse();
|
||||
}
|
||||
|
||||
private Document load(URL url) throws IOException {
|
||||
private XdmNode load(URL url) throws IOException {
|
||||
DocumentParseAction p = new DocumentParseAction();
|
||||
return p.parseDocument(read(url)).getObject();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,7 +69,6 @@ public class SchemaValidatorActionTest {
|
|||
@Test
|
||||
public void testSimple() {
|
||||
CheckAction.Bag bag = new CheckAction.Bag(InputFactory.read(VALID_EXAMPLE), new CreateReportInput());
|
||||
bag.setParserResult(Helper.load(VALID_EXAMPLE));
|
||||
ScenarioType t = new ScenarioType();
|
||||
ValidateWithXmlSchema v = new ValidateWithXmlSchema();
|
||||
ResourceType r = new ResourceType();
|
||||
|
|
@ -88,7 +87,6 @@ public class SchemaValidatorActionTest {
|
|||
@Test
|
||||
public void testValidationFailure() throws MalformedURLException {
|
||||
CheckAction.Bag bag = new CheckAction.Bag(InputFactory.read(INVALID_EXAMPLE.toURL()), new CreateReportInput());
|
||||
bag.setParserResult(Helper.load(INVALID_EXAMPLE.toURL()));
|
||||
ScenarioType t = new ScenarioType();
|
||||
ValidateWithXmlSchema v = new ValidateWithXmlSchema();
|
||||
ResourceType r = new ResourceType();
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ import de.kosit.validationtool.model.scenarios.Scenarios;
|
|||
|
||||
/**
|
||||
* Testet die Versionierung von Scenario-Dateien aka Konfigurationsdaten.
|
||||
*
|
||||
*
|
||||
* @author Andreas Penski
|
||||
*/
|
||||
public class VersioningTest {
|
||||
|
|
@ -45,7 +45,7 @@ public class VersioningTest {
|
|||
|
||||
private static final URL NEW_FEATURE = VersioningTest.class.getResource("/examples/versioning/scenarios-newfeature.xml");
|
||||
|
||||
private static final URL NEW_VERSION = VersioningTest.class.getResource("/examples/versioning/scenarios-newVersion.xml");
|
||||
private static final URL NEW_VERSION = VersioningTest.class.getResource("/examples/versioning/scenarios-newversion.xml");
|
||||
|
||||
@Rule
|
||||
public ExpectedException exception = ExpectedException.none();
|
||||
|
|
|
|||
|
|
@ -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