From 2066730ca2cd687ce427cf48dea07be1c363ec54 Mon Sep 17 00:00:00 2001 From: Bertrand Lorentz Date: Mon, 15 Jan 2024 11:44:40 +0100 Subject: [PATCH] Check that schematron files are well formed and valid (TEDEFO-2929) Use ph-schematron to validate the Schematron files. This checks that they are well-formed XML , and validates against the RELAX NG schema from the ISO standard. Adding the dependency on ph-schematron seems to change the JAXB dependencies, so some dependencies have to be added explicitly in pom.xml to avoid runtime errors about classes not found. --- pom.xml | 60 +++- .../ted/eforms/sdk/analysis/SdkAnalyzer.java | 2 + .../ted/eforms/sdk/analysis/SdkLoader.java | 12 +- .../sdk/analysis/fact/SchematronFact.java | 22 ++ .../validator/SchematronValidator.java | 115 +++++++ .../analysis/cucumber/SdkValidationSteps.java | 23 ++ .../tedefo-2929/invalid/schematrons/README.md | 31 ++ .../dynamic/complete-validation.sch | 318 ++++++++++++++++++ .../invalid/schematrons/dynamic/config.sch | 5 + .../dynamic/validation-stage-1a.sch | 21 ++ .../dynamic/validation-stage-1b-1.sch | 40 +++ .../dynamic/validation-stage-1b-16.sch | 85 +++++ .../static/complete-validation.sch | 316 +++++++++++++++++ .../static/validation-stage-1a.sch | 21 ++ .../static/validation-stage-1b-1.sch | 40 +++ .../static/validation-stage-1b-16.sch | 85 +++++ .../tedefo-2929/valid/schematrons/README.md | 31 ++ .../dynamic/complete-validation.sch | 318 ++++++++++++++++++ .../valid/schematrons/dynamic/config.sch | 5 + .../dynamic/validation-stage-1a.sch | 21 ++ .../dynamic/validation-stage-1b-1.sch | 40 +++ .../dynamic/validation-stage-1b-16.sch | 85 +++++ .../static/complete-validation.sch | 316 +++++++++++++++++ .../static/validation-stage-1a.sch | 21 ++ .../static/validation-stage-1b-1.sch | 40 +++ .../static/validation-stage-1b-16.sch | 85 +++++ .../sdk/analysis/cucumber/tedefo-2929.feature | 14 + 27 files changed, 2165 insertions(+), 7 deletions(-) create mode 100644 src/main/java/eu/europa/ted/eforms/sdk/analysis/fact/SchematronFact.java create mode 100644 src/main/java/eu/europa/ted/eforms/sdk/analysis/validator/SchematronValidator.java create mode 100644 src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/README.md create mode 100644 src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/dynamic/complete-validation.sch create mode 100644 src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/dynamic/config.sch create mode 100644 src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/dynamic/validation-stage-1a.sch create mode 100644 src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/dynamic/validation-stage-1b-1.sch create mode 100644 src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/dynamic/validation-stage-1b-16.sch create mode 100644 src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/static/complete-validation.sch create mode 100644 src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/static/validation-stage-1a.sch create mode 100644 src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/static/validation-stage-1b-1.sch create mode 100644 src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/static/validation-stage-1b-16.sch create mode 100644 src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/README.md create mode 100644 src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/dynamic/complete-validation.sch create mode 100644 src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/dynamic/config.sch create mode 100644 src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/dynamic/validation-stage-1a.sch create mode 100644 src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/dynamic/validation-stage-1b-1.sch create mode 100644 src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/dynamic/validation-stage-1b-16.sch create mode 100644 src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/static/complete-validation.sch create mode 100644 src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/static/validation-stage-1a.sch create mode 100644 src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/static/validation-stage-1b-1.sch create mode 100644 src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/static/validation-stage-1b-16.sch create mode 100644 src/test/resources/eu/europa/ted/eforms/sdk/analysis/cucumber/tedefo-2929.feature diff --git a/pom.xml b/pom.xml index af0b441..a841194 100644 --- a/pom.xml +++ b/pom.xml @@ -44,11 +44,15 @@ 3.12.0 7.11.1 8.44.0.Final + 3.0.11 2.14.1 + 2.3.2 + 2.3.2 5.9.2 1.4.14 3.9.1 4.6.3 + 6.3.4 3.1.0 2.0.3 2.3.0 @@ -133,6 +137,24 @@ import + + + com.sun.istack + istack-commons-runtime + ${version.istack} + + + jakarta.xml.bind + jakarta.xml.bind-api + ${version.jaxb-bind-api} + + + com.sun.xml.bind + jaxb-impl + ${version.jaxb-impl} + runtime + + org.slf4j @@ -156,6 +178,16 @@ picocli ${version.picocli} + + com.helger.schematron + ph-schematron-api + ${version.ph-schematron} + + + com.helger.schematron + ph-schematron-validator + ${version.ph-schematron} + org.apache.maven maven-model @@ -244,6 +276,20 @@ runtime + + + com.sun.istack + istack-commons-runtime + + + jakarta.xml.bind + jakarta.xml.bind-api + + + com.sun.xml.bind + jaxb-impl + runtime + @@ -285,6 +331,14 @@ picocli true + + com.helger.schematron + ph-schematron-api + + + com.helger.schematron + ph-schematron-validator + org.apache.maven maven-model @@ -384,12 +438,6 @@ - - - - jakarta.activation:jakarta.activation-api - - *:* diff --git a/src/main/java/eu/europa/ted/eforms/sdk/analysis/SdkAnalyzer.java b/src/main/java/eu/europa/ted/eforms/sdk/analysis/SdkAnalyzer.java index d30f242..db535e2 100644 --- a/src/main/java/eu/europa/ted/eforms/sdk/analysis/SdkAnalyzer.java +++ b/src/main/java/eu/europa/ted/eforms/sdk/analysis/SdkAnalyzer.java @@ -8,6 +8,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import eu.europa.ted.eforms.sdk.analysis.validator.EfxValidator; +import eu.europa.ted.eforms.sdk.analysis.validator.SchematronValidator; import eu.europa.ted.eforms.sdk.analysis.validator.SdkValidator; import eu.europa.ted.eforms.sdk.analysis.validator.TextValidator; import eu.europa.ted.eforms.sdk.analysis.validator.Validator; @@ -28,6 +29,7 @@ public static int analyze(final Path sdkRoot) throws Exception { new XmlSchemaValidator(sdkRoot), new EfxValidator(sdkRoot), new TextValidator(sdkRoot), + new SchematronValidator(sdkRoot), new SdkValidator(sdkRoot)); for (Validator validator : validators) { diff --git a/src/main/java/eu/europa/ted/eforms/sdk/analysis/SdkLoader.java b/src/main/java/eu/europa/ted/eforms/sdk/analysis/SdkLoader.java index 228a4a9..de94c67 100644 --- a/src/main/java/eu/europa/ted/eforms/sdk/analysis/SdkLoader.java +++ b/src/main/java/eu/europa/ted/eforms/sdk/analysis/SdkLoader.java @@ -58,7 +58,9 @@ public class SdkLoader { // Not in SdkResource, as it is not useful when you use the SDK in an app public static final Path EXAMPLE_NOTICES = Path.of("examples", "notices"); public static final Path EXAMPLE_REPORTS = Path.of("examples", "reports"); - + public static final Path SCHEMATRONS_DYNAMIC = Path.of("schematrons", "dynamic"); + public static final Path SCHEMATRONS_STATIC = Path.of("schematrons", "static"); + private final Path sdkRoot; private final ObjectMapper objectMapper; @@ -338,4 +340,12 @@ public XmlSchemaCollection getXmlSchemas() throws IOException { return schemaCol; } + + public List getSchematronFiles() { + String startFile = "complete-validation.sch"; + + return List.of( + sdkRoot.resolve(SCHEMATRONS_DYNAMIC).resolve(startFile), + sdkRoot.resolve(SCHEMATRONS_STATIC).resolve(startFile)); + } } diff --git a/src/main/java/eu/europa/ted/eforms/sdk/analysis/fact/SchematronFact.java b/src/main/java/eu/europa/ted/eforms/sdk/analysis/fact/SchematronFact.java new file mode 100644 index 0000000..3e99da0 --- /dev/null +++ b/src/main/java/eu/europa/ted/eforms/sdk/analysis/fact/SchematronFact.java @@ -0,0 +1,22 @@ +package eu.europa.ted.eforms.sdk.analysis.fact; + +import java.nio.file.Path; + +public class SchematronFact implements SdkComponentFact { + + private final Path path; + + public SchematronFact(Path path) { + this.path = path; + } + + @Override + public String getId() { + return path.toString(); + } + + @Override + public String getTypeName() { + return "schematron"; + } +} diff --git a/src/main/java/eu/europa/ted/eforms/sdk/analysis/validator/SchematronValidator.java b/src/main/java/eu/europa/ted/eforms/sdk/analysis/validator/SchematronValidator.java new file mode 100644 index 0000000..7405239 --- /dev/null +++ b/src/main/java/eu/europa/ted/eforms/sdk/analysis/validator/SchematronValidator.java @@ -0,0 +1,115 @@ +package eu.europa.ted.eforms.sdk.analysis.validator; + +import java.util.HashSet; +import java.util.Locale; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.Set; + +import javax.xml.transform.Source; + +import org.apache.commons.lang3.Validate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.helger.commons.error.IError; +import com.helger.commons.error.list.IErrorList; +import com.helger.commons.io.resource.FileSystemResource; +import com.helger.commons.io.resource.IReadableResource; +import com.helger.schematron.SchematronHelper; +import com.helger.xml.microdom.IMicroDocument; +import com.helger.xml.microdom.serialize.MicroWriter; +import com.helger.xml.transform.TransformSourceFactory; + +import eu.europa.ted.eforms.sdk.analysis.SdkLoader; +import eu.europa.ted.eforms.sdk.analysis.enums.ValidationStatusEnum; +import eu.europa.ted.eforms.sdk.analysis.fact.SchematronFact; +import eu.europa.ted.eforms.sdk.analysis.vo.ValidationResult; + +/** + * Validates the content of Schematron files. + * It does not use Schematron to validate something else. + */ +public class SchematronValidator implements Validator { + private static final Logger logger = LoggerFactory.getLogger(SchematronValidator.class); + + private final SdkLoader sdkLoader; + private final Set results; + + public SchematronValidator(Path sdkRoot) throws IOException { + Validate.notNull(sdkRoot, "Undefined SDK root path"); + if (!Files.isDirectory(sdkRoot)) { + throw new FileNotFoundException(sdkRoot.toString()); + } + + this.sdkLoader = new SdkLoader(Path.of(sdkRoot.toString())); + + this.results = new HashSet<>(); + } + + @Override + public Validator validate() throws Exception { + logger.debug("Validating Schematron files"); + + sdkLoader.getSchematronFiles().forEach(file -> { + if (file == null) { + return; + } + IReadableResource schematron = new FileSystemResource(file); + // Resolve all included files, so that they also get validated. + final IMicroDocument doc = SchematronHelper.getWithResolvedSchematronIncludes(schematron, + e -> handleError(e, file)); + + if (doc == null) { + ValidationResult result = new ValidationResult(new SchematronFact(file), + "File is not well-formed XML", ValidationStatusEnum.ERROR); + + results.add(result); + return; + } + + String resolved = MicroWriter.getNodeAsString(doc); + if (resolved == null) { + ValidationResult result = new ValidationResult(new SchematronFact(file), + "Resolved schematron could not be processed", ValidationStatusEnum.ERROR); + + results.add(result); + return; + } + Source source = TransformSourceFactory.create(resolved); + IErrorList errors = com.helger.schematron.validator.SchematronValidator.validateSchematron(source); + + if (errors != null) { + errors.forEach(e -> handleError(e, file)); + } else { + ValidationResult result = new ValidationResult(new SchematronFact(file), + "Error while validating schematron", ValidationStatusEnum.ERROR); + + results.add(result); + return; + } + }); + + return this; + } + + private void handleError(IError error, Path file) { + if (error.getErrorLevel().isError()) { + Locale locale = Locale.getDefault(); + if (locale == null) { + locale = new Locale("en"); + } + ValidationResult result = new ValidationResult(new SchematronFact(file), + error.getErrorText(locale), ValidationStatusEnum.ERROR); + + results.add(result); + } + } + + @Override + public Set getResults() { + return results; + } +} diff --git a/src/test/java/eu/europa/ted/eforms/sdk/analysis/cucumber/SdkValidationSteps.java b/src/test/java/eu/europa/ted/eforms/sdk/analysis/cucumber/SdkValidationSteps.java index f611e3a..d400fe7 100644 --- a/src/test/java/eu/europa/ted/eforms/sdk/analysis/cucumber/SdkValidationSteps.java +++ b/src/test/java/eu/europa/ted/eforms/sdk/analysis/cucumber/SdkValidationSteps.java @@ -21,6 +21,7 @@ import eu.europa.ted.eforms.sdk.analysis.FactsLoader; import eu.europa.ted.eforms.sdk.analysis.util.SdkMetadataParser; import eu.europa.ted.eforms.sdk.analysis.validator.EfxValidator; +import eu.europa.ted.eforms.sdk.analysis.validator.SchematronValidator; import eu.europa.ted.eforms.sdk.analysis.validator.SdkValidator; import eu.europa.ted.eforms.sdk.analysis.validator.TextValidator; import eu.europa.ted.eforms.sdk.analysis.validator.XmlSchemaValidator; @@ -39,6 +40,7 @@ public class SdkValidationSteps { private EfxValidator efxValidator; private TextValidator textValidator; private XmlSchemaValidator schemaValidator; + private SchematronValidator schematronValidator; private List testedRules = new ArrayList<>(); @@ -219,6 +221,22 @@ public void i_execute_text_validation() throws Exception { } } + @When("I execute schematron validation") + public void i_execute_schematron_validation() throws Exception { + schematronValidator = new SchematronValidator(testsFolder); + schematronValidator.validate(); + + if (schematronValidator.hasWarnings()) { + logger.warn("Validation warnings:\n{}", + StringUtils.join(schematronValidator.getWarnings(), '\n')); + } + + if (schematronValidator.hasErrors()) { + logger.error("Validation errors:\n{}", + StringUtils.join(schematronValidator.getErrors(), '\n')); + } + } + @Then("No rules should have been fired") public void no_rules_should_have_been_fired() { assertEquals(0, sdkValidator.getFiredRulesNames().size()); @@ -257,6 +275,11 @@ public void i_should_get_text_validation_errors(int errorsCount) { assertEquals(errorsCount, textValidator.getErrors().length); } + @Then("^I should get (.*) schematron validation errors?$") + public void i_should_get_schematron_validation_errors(int errorsCount) { + assertEquals(errorsCount, schematronValidator.getErrors().length); + } + @Then("I should get not found exception for file {string}") public void i_should_get_not_found_exception_for_file(String fileName) { assertEquals(FileNotFoundException.class, thrownException.getClass()); diff --git a/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/README.md b/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/README.md new file mode 100644 index 0000000..de6cc39 --- /dev/null +++ b/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/README.md @@ -0,0 +1,31 @@ +# eForms Schematron rules + +The Schematron rules used to validate eForms notices. + +## Structure + +The validation of eForms notices is conceptually structured in several stages: +- Stage 1: Check the presence and absence of container elements; +- Stage 2: Check the presence and absence of the leaf elements (a.k.a. Business Terms) together with the notice type and legal basis as per the eForms regulation. It also includes checks of the repeatable elements and the multilingual ones. +- Stage 3: Check values of leaf elements (Business Terms). This includes: + - checking that a value matches a specific pattern, for example for a URL or an email address; + - checking that a value is part of a given codelist. +- Stage 4: Check the presence and absence of leaf elements or their related values depending on specific conditions which apply to the notice being checked. This includes, among others, the "conditional mandatory" rules from the eForms regulation. +- Stage 5 : Check the values of leaf elements in the notice are consistent with each other. + +Those stages are implemented in one or more schematron files. Each file contains a single `pattern` root element. Some stages require rules with distinct contexts to be applied to the same node, so they are implemented in more than one pattern. + +Those Schematron files are all referenced in a single file `complete-validation.sch`, using the Schematron `include` element. + +Schematron rules are organised in 2 folders: +* `static`: all rules that only use information in the notice being validated, as described above. +* `dynamic`: all rules in `static`, plus rules that use information in other notices. + +In the `dynamic` folder, additional schematron files named `validation-stage-6*.sch` checks that a change notice is consistent with the original notice. This requires fetching the original notice based on its identifier, by making an HTTP request to an external service. +The URL of this service is configured by a variable defined in the file `config.sch`, which is included in `complete-validation.sch`. + +## Usage + +The schematron rules can be executed via any standard Schematron implementation, using the file `complete-validation.sch`. + +If you use the XSLT implementation at https://github.com/Schematron/schematron, you must implement the following fix so that rules on attributes are fired: https://github.com/Schematron/schematron/issues/29. diff --git a/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/dynamic/complete-validation.sch b/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/dynamic/complete-validation.sch new file mode 100644 index 0000000..c0a36f9 --- /dev/null +++ b/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/dynamic/complete-validation.sch @@ -0,0 +1,318 @@ + + + + + eForms schematron rules + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cac:ProcessJustification + cac:AuctionTerms + cac:AwardingTerms + cac:TechnicalCommitteePerson/cbc:FamilyName + cac:PostalAddress + cac:Contact + cac:BusinessParty + cac:PartyLegalEntity[cbc:CompanyID/@schemeName = 'EU']/cbc:CompanyID + cac:PartyLegalEntity[cbc:CompanyID/@schemeName = 'national']/cbc:CompanyID + cac:Party + cac:ServiceProviderParty/cac:Party/cac:PartyIdentification/cbc:ID + efac:Change + efac:Company + cac:PostalAddress/cbc:Department + cac:PartyLegalEntity/cbc:CompanyID + cac:Contact/cbc:Name + cac:Contact/cbc:Telephone + cac:Contact/cbc:ElectronicMail + cac:PostalAddress/cbc:CountrySubentityCode + cac:PostalAddress/cbc:StreetName + cac:PostalAddress/cbc:AdditionalStreetName + cac:PostalAddress/cac:AddressLine/cbc:Line + cac:PostalAddress/cbc:PostalZone + cac:PostalAddress/cbc:CityName + cac:PostalAddress/cac:Country/cbc:IdentificationCode + cac:Contact/cbc:Telefax + efac:ConcessionRevenue + efac:Funding + efac:ContractModification + efac:Change/efac:ChangedSection/efbc:ChangedSectionIdentifier + cac:ContractingParty + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:FieldsPrivacy + cac:SpecificTendererRequirement + cac:ContractExecutionRequirement + efac:DurationJustification + cac:FrameworkAgreement + efac:Funding + cac:AdditionalDocumentReference + cac:LotsGroup + cac:ProcurementProjectLotReference/cbc:ID[@schemeName='Lot'] + efac:InterestExpressionReceptionPeriod + cac:PartyLegalEntity + cac:AwardingCriterion + cac:SubordinateAwardingCriterion/cbc:AwardingCriterionTypeCode[@listName='award-criterion-type'] + efac:FieldsPrivacy + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:FieldsPrivacy + efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-fixed']/efbc:ParameterNumeric + efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-threshold']/efbc:ParameterNumeric + efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-weight']/efbc:ParameterNumeric + efac:FieldsPrivacy + cac:LotDistribution + cac:LotsGroup/cbc:LotsGroupID + cac:PlannedPeriod + cac:EmploymentLegislationDocumentReference + cac:EnvironmentalLegislationDocumentReference + cac:FiscalLegislationDocumentReference + cac:Address/cbc:CountrySubentityCode + cac:Address/cbc:StreetName + cac:Address/cbc:AdditionalStreetName + cac:Address/cac:AddressLine/cbc:Line + cac:Address/cbc:PostalZone + cac:Address/cbc:CityName + cac:Address/cac:Country/cbc:IdentificationCode + cac:Address/cbc:Region + cac:NoticeDocumentReference + cac:CallForTendersDocumentReference + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:OfficialLanguages/cac:Language/cbc:ID + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NonOfficialLanguages/cac:Language/cbc:ID + cac:ProcurementProject + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='strategic-procurement']/cbc:ProcurementTypeCode + cac:MainCommodityClassification/cbc:ItemClassificationCode + cac:AdditionalCommodityClassification/cbc:ItemClassificationCode + cac:RequestedTenderTotal/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efbc:FrameworkMaximumAmount + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='contract-nature']/cbc:ProcurementTypeCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='accessibility']/cbc:ProcurementTypeCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='environmental-impact']/cbc:ProcurementTypeCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='social-objective']/cbc:ProcurementTypeCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='innovative-acquisition']/cbc:ProcurementTypeCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='gpp-criteria']/cbc:ProcurementTypeCode + cac:TendererQualificationRequest + cac:SpecificTendererRequirement[cbc:TendererRequirementTypeCode/@listName='reserved-procurement']/cbc:TendererRequirementTypeCode + efac:LotResult + efac:FrameworkAgreementValues + efac:AppealRequestsStatistics[efbc:StatisticsCode/@listName='irregularity-type']/efbc:StatisticsCode + efac:AppealRequestsStatistics[efbc:StatisticsCode/@listName='review-type']/efbc:StatisticsCode + efac:ReceivedSubmissionsStatistics/efbc:StatisticsNumeric + efac:ReceivedSubmissionsStatistics/efbc:StatisticsCode + cac:FinancingParty/cac:PartyIdentification/cbc:ID + cac:PayerParty/cac:PartyIdentification/cbc:ID + efac:SettledContract/cbc:ID + efac:LotTender/cbc:ID + cac:AppealTerms + cac:PresentationPeriod/cbc:Description + efac:LotTender + efac:Origin + efac:Origin/efbc:AreaCode + efac:AggregatedAmounts/cbc:PaidAmount + efac:AggregatedAmounts/efbc:PaidAmountDescription + efac:AggregatedAmounts/efbc:PenaltiesAmount + efac:ContractTerm[not(efbc:TermCode/text()='all-rev-tic')][efbc:TermCode/@listName='contract-detail']/efbc:TermCode + efac:ContractTerm[efbc:TermCode/@listName='rewards-penalties']/efbc:TermCode + cac:TenderingProcess + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension + cac:NoticeDocumentReference/cbc:ReferencedDocumentInternalAddress + cac:ParticipationRequestReceptionPeriod/cbc:EndDate + cac:ParticipationRequestReceptionPeriod/cbc:EndTime + cac:TenderSubmissionDeadlinePeriod/cbc:EndDate + cac:TenderSubmissionDeadlinePeriod/cbc:EndTime + cac:OpenTenderEvent/cbc:OccurrenceDate + cac:AdditionalInformationRequestPeriod/cbc:EndDate + cac:AdditionalInformationRequestPeriod/cbc:EndTime + cac:ContractingSystem[cbc:ContractingSystemTypeCode/@listName='framework-agreement']/cbc:ContractingSystemTypeCode + cac:ContractingSystem[cbc:ContractingSystemTypeCode/@listName='dps-usage']/cbc:ContractingSystemTypeCode + cac:TenderingTerms + cac:TenderRecipientParty/cbc:EndpointID + cac:AllowedSubcontractTerms[cbc:SubcontractingConditionsCode/@listName='subcontracting-obligation']/cbc:SubcontractingConditionsCode + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='reserved-execution']/cbc:ExecutionRequirementCode + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='einvoicing']/cbc:ExecutionRequirementCode + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='esignature-submission']/cbc:ExecutionRequirementCode + cac:RequiredFinancialGuarantee/cbc:Description + cac:RequiredFinancialGuarantee/cbc:GuaranteeTypeCode[@listName='tender-guarantee-required'] + cac:TendererQualificationRequest[not(cac:SpecificTendererRequirement)]/cbc:CompanyLegalForm + cac:TendererQualificationRequest[not(cac:SpecificTendererRequirement)]/cbc:CompanyLegalFormCode + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='ecatalog-submission']/cbc:ExecutionRequirementCode + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='nda']/cbc:ExecutionRequirementCode + cac:Language/cbc:ID + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='conditions']/cbc:ExecutionRequirementCode + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='customer-service']/cbc:ExecutionRequirementCode + cac:TenderRecipientParty/cac:PartyIdentification/cbc:ID + cac:RequestedTenderTotal + cac:SubordinateAwardingCriterion/cbc:AwardingCriterionTypeCode[@listName='award-criterion-type'] + efac:FieldsPrivacy + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:FieldsPrivacy + efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-fixed']/efbc:ParameterNumeric + efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-threshold']/efbc:ParameterNumeric + efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-weight']/efbc:ParameterNumeric + efac:FieldsPrivacy + cac:TenderingTerms/cac:AwardingTerms + cac:TenderingProcess/cac:FrameworkAgreement + cac:RequestedTenderTotal/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efbc:FrameworkMaximumAmount + cac:RequestedTenderTotal + efac:Change + efac:ChangeReason + efac:ChangedSection + cac:ProcessJustification + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension + efac:Funding/efbc:FinancingIdentifier + efac:TenderSubcontractingRequirements/efbc:TenderSubcontractingRequirementsCode + efac:Funding/cbc:FundingProgramCode + efac:SelectionCriteria/cbc:CriterionTypeCode[@listName='selection-criterion'] + efac:DecisionReason/efac:FieldsPrivacy + efac:FieldsPrivacy + efac:NoticeResult + efac:GroupFramework + efac:NoticePurpose + cac:ContractExtension + cac:Renewal/cac:Period/cbc:Description + efac:Organization + efac:TouchPoint/cac:PartyIdentification/cbc:ID + efac:UltimateBeneficialOwner/cbc:ID + efac:Organizations + efac:UltimateBeneficialOwner/cbc:ID + efac:ContractTerm + efac:AnswerReceptionPeriod + cac:ProcurementProjectLot[cbc:ID/@schemeName='Part'] + cac:EmploymentLegislationDocumentReference + cac:EnvironmentalLegislationDocumentReference + cac:FiscalLegislationDocumentReference + cac:Address/cbc:CountrySubentityCode + cac:Address/cbc:StreetName + cac:Address/cbc:AdditionalStreetName + cac:Address/cac:AddressLine/cbc:Line + cac:Address/cbc:PostalZone + cac:Address/cbc:CityName + cac:Address/cac:Country/cbc:IdentificationCode + cac:Address/cbc:Region + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:OfficialLanguages/cac:Language/cbc:ID + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NonOfficialLanguages/cac:Language/cbc:ID + cac:ProcurementProject + cac:MainCommodityClassification/cbc:ItemClassificationCode + cac:AdditionalCommodityClassification/cbc:ItemClassificationCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='contract-nature']/cbc:ProcurementTypeCode + cac:SpecificTendererRequirement[cbc:TendererRequirementTypeCode/@listName='reserved-procurement']/cbc:TendererRequirementTypeCode + cac:AppealTerms + cac:NoticeDocumentReference/cbc:ReferencedDocumentInternalAddress + cac:AdditionalInformationRequestPeriod/cbc:EndDate + cac:AdditionalInformationRequestPeriod/cbc:EndTime + cac:ContractingSystem[cbc:ContractingSystemTypeCode/@listName='framework-agreement']/cbc:ContractingSystemTypeCode + cac:ContractingSystem[cbc:ContractingSystemTypeCode/@listName='dps-usage']/cbc:ContractingSystemTypeCode + cac:TenderingTerms + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='reserved-execution']/cbc:ExecutionRequirementCode + cac:EconomicOperatorShortList + cac:PreSelectedParty/cac:PartyName/cbc:Name + cac:PaymentTerms + cac:PostAwardProcess + cac:Prize + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:FieldsPrivacy + cac:RealizedLocation + cac:ProcurementProject + cac:MainCommodityClassification/cbc:ItemClassificationCode + cac:AdditionalCommodityClassification/cbc:ItemClassificationCode + cac:RequestedTenderTotal/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efbc:FrameworkMaximumAmount + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='contract-nature']/cbc:ProcurementTypeCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='transport-service']/cbc:ProcurementTypeCode + cac:TenderingProcess + cac:NoticeDocumentReference/cbc:ID + cac:TenderingTerms + cac:ProcurementLegislationDocumentReference[not(cbc:ID/text()=('CrossBorderLaw','LocalLegalBasis'))]/cbc:ID + cac:ProcurementLegislationDocumentReference[cbc:ID/text()='LocalLegalBasis']/cbc:ID + cac:ProcurementLegislationDocumentReference[cbc:ID/text()='CrossBorderLaw']/cbc:ID + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:FieldsPrivacy + cac:RequestedTenderTotal + cac:OpenTenderEvent + cac:OccurenceLocation/cbc:Description + efac:ReceivedSubmissionsStatistics + efac:AppealsInformation + efac:AppealRequestsStatistics + efac:AppealedItem/cbc:ID + efac:AppealDecision/efbc:DecisionTypeCode + efac:AppealIrregularity/efbc:IrregularityTypeCode + efac:AppealRemedy/efbc:RemedyTypeCode + efac:AppealProcessingParty/efbc:AppealProcessingPartyTypeCode + efac:AppealingParty/efbc:AppealingPartyTypeCode + efac:AppealProcessingParty/efbc:AppealProcessingPartyTypeDescription + efac:AppealProcessingParty/cac:Party/cac:PartyIdentification/cbc:ID + efac:AppealingParty/cac:Party/cac:PartyIdentification/cbc:ID + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension + efac:Publication/efbc:NoticePublicationID[@schemeName='ojs-notice-id'] + efac:Publication/efbc:GazetteID[@schemeName='ojs-id'] + efac:Publication/efbc:PublicationDate + cac:BusinessCapability/cbc:CapabilityTypeCode + cac:ContractingParty/cac:Party/cac:PartyIdentification/cbc:ID + cac:EconomicOperatorShortList + efac:CriterionParameter + cac:SecurityClearanceTerm + efac:SelectionCriteria + efac:CriterionParameter[efbc:ParameterCode/@listName='number-threshold']/efbc:ParameterNumeric + efac:CriterionParameter[efbc:ParameterCode/@listName='number-weight']/efbc:ParameterNumeric + cac:SenderParty/cac:Contact + efac:SettledContract + efac:LotTender/cbc:ID + efac:Funding/efbc:FinancingIdentifier + efac:Funding/cbc:FundingProgramCode + cac:SignatoryParty/cac:PartyIdentification/cbc:ID + efac:StrategicProcurement + efac:StrategicProcurement + efac:MainContractor/cbc:ID + efac:SubcontractingTerm + cac:AllowedSubcontractTerms + cac:TendererQualificationRequest + efac:Tenderer/cbc:ID + efac:SubContractor/cbc:ID + cac:PostalAddress/cbc:Department + cac:Contact/cbc:Name + cac:Contact/cbc:Telephone + cac:Contact/cbc:ElectronicMail + cac:PostalAddress/cbc:CountrySubentityCode + cac:PostalAddress/cbc:StreetName + cac:PostalAddress/cbc:AdditionalStreetName + cac:PostalAddress/cac:AddressLine/cbc:Line + cac:PostalAddress/cbc:PostalZone + cac:PostalAddress/cbc:CityName + cac:PostalAddress/cac:Country/cbc:IdentificationCode + cac:Contact/cbc:Telefax + cac:Contact/cbc:Telephone + cac:Contact/cbc:ElectronicMail + cac:ResidenceAddress/cbc:CountrySubentityCode + cac:ResidenceAddress/cbc:StreetName + cac:ResidenceAddress/cbc:AdditionalStreetName + cac:ResidenceAddress/cac:AddressLine/cbc:Line + cac:ResidenceAddress/cbc:PostalZone + cac:ResidenceAddress/cbc:CityName + cac:ResidenceAddress/cac:Country/cbc:IdentificationCode + efac:Nationality/cbc:NationalityID + cac:Contact/cbc:Telefax + efac:FieldsPrivacy + + \ No newline at end of file diff --git a/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/dynamic/config.sch b/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/dynamic/config.sch new file mode 100644 index 0000000..bb6e87b --- /dev/null +++ b/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/dynamic/config.sch @@ -0,0 +1,5 @@ + + + diff --git a/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/dynamic/validation-stage-1a.sch b/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/dynamic/validation-stage-1a.sch new file mode 100644 index 0000000..fcd08bd --- /dev/null +++ b/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/dynamic/validation-stage-1a.sch @@ -0,0 +1,21 @@ + + + + + rule|text|P-0001 + + + rule|text|P-0002 + + + + + rule|text|P-0004 + + + + + rule|text|P-0005 + + + diff --git a/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/dynamic/validation-stage-1b-1.sch b/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/dynamic/validation-stage-1b-1.sch new file mode 100644 index 0000000..032b37e --- /dev/null +++ b/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/dynamic/validation-stage-1b-1.sch @@ -0,0 +1,40 @@ + + + + + rule|text|ND-BusinessParty-1 + rule|text|ND-ContractingParty-1 + rule|text|ND-GazetteReference-1 + rule|text|ND-OperationType-1 + rule|text|ND-Part-1 + rule|text|ND-ProcedureProcurementScope-1 + rule|text|ND-ProcedureTenderingProcess-1 + rule|text|ND-RootExtension-1 + rule|text|ND-SenderContact-1 + + + rule|text|ND-Buyer-1 + + + rule|text|ND-ProcedureValueEstimate-1 + + + rule|text|ND-LotDistribution-1 + rule|text|ND-TendererQualificationRequest-1 + + + rule|text|ND-CrossBorderLawUnpublish-1 + + + rule|text|ND-ContractModification-1 + rule|text|ND-NoticeResult-1 + rule|text|ND-Organizations-1 + rule|text|ND-ReviewRequests-1 + + + rule|text|ND-Organization-1 + + + rule|text|ND-Company-1 + + diff --git a/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/dynamic/validation-stage-1b-16.sch b/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/dynamic/validation-stage-1b-16.sch new file mode 100644 index 0000000..67d8951 --- /dev/null +++ b/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/dynamic/validation-stage-1b-16.sch @@ -0,0 +1,85 @@ + + + + + rule|text|ND-BusinessParty-16 + rule|text|ND-ContractingParty-16 + rule|text|ND-GazetteReference-16 + rule|text|ND-OperationType-16 + rule|text|ND-Part-16 + rule|text|ND-ProcedureProcurementScope-16 + rule|text|ND-ProcedureTenderingProcess-16 + rule|text|ND-ProcedureTerms-16 + rule|text|ND-RootExtension-16 + rule|text|ND-SenderContact-16 + + + rule|text|ND-Buyer-16 + + + rule|text|ND-LotProcurementScope-16 + rule|text|ND-LotTenderingProcess-16 + rule|text|ND-LotTenderingTerms-16 + + + rule|text|ND-AuctionTerms-16 + + + rule|text|ND-InterestExpressionReceptionPeriod-16 + rule|text|ND-PMCAnswersDeadline-16 + + + rule|text|ND-LotProcurementDocument-16 + rule|text|ND-LotReservedParticipation-16 + rule|text|ND-LotReviewTerms-16 + rule|text|ND-NonUBLTenderingTerms-16 + rule|text|ND-Participants-16 + rule|text|ND-PostAwardProcess-16 + rule|text|ND-SubcontractingObligation-16 + + + rule|text|ND-LotAwardCriterionNumberComplicatedUnpublish-16 + + + rule|text|ND-LotAwardCriterionTypeUnpublish-16 + + + rule|text|ND-LotAwardCriterionFixNumberUnpublish-16 + + + rule|text|ND-LotsGroupAwardCriterionNumberComplicatedUnpublish-16 + + + rule|text|ND-LotsGroupAwardCriterionTypeUnpublish-16 + + + rule|text|ND-LotsGroupAwardCriterionFixNumberUnpublish-16 + + + rule|text|ND-ProcedureTypeUnpublish-16 + + + rule|text|ND-ProcedureAcceleratedUnpublish-16 + + + rule|text|ND-TendererQualificationRequest-16 + + + rule|text|ND-CrossBorderLawUnpublish-16 + + + rule|text|ND-ExclusionGrounds-16 + + + rule|text|ND-ContractModification-16 + rule|text|ND-NoticeResult-16 + rule|text|ND-Organizations-16 + rule|text|ND-ReviewRequests-16 + + + rule|text|ND-Organization-16 + + + rule|text|ND-Company-16 + + diff --git a/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/static/complete-validation.sch b/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/static/complete-validation.sch new file mode 100644 index 0000000..712f06f --- /dev/null +++ b/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/static/complete-validation.sch @@ -0,0 +1,316 @@ + + + + + eForms schematron rules + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cac:ProcessJustification + cac:AuctionTerms + cac:AwardingTerms + cac:TechnicalCommitteePerson/cbc:FamilyName + cac:PostalAddress + cac:Contact + cac:BusinessParty + cac:PartyLegalEntity[cbc:CompanyID/@schemeName = 'EU']/cbc:CompanyID + cac:PartyLegalEntity[cbc:CompanyID/@schemeName = 'national']/cbc:CompanyID + cac:Party + cac:ServiceProviderParty/cac:Party/cac:PartyIdentification/cbc:ID + efac:Change + efac:Company + cac:PostalAddress/cbc:Department + cac:PartyLegalEntity/cbc:CompanyID + cac:Contact/cbc:Name + cac:Contact/cbc:Telephone + cac:Contact/cbc:ElectronicMail + cac:PostalAddress/cbc:CountrySubentityCode + cac:PostalAddress/cbc:StreetName + cac:PostalAddress/cbc:AdditionalStreetName + cac:PostalAddress/cac:AddressLine/cbc:Line + cac:PostalAddress/cbc:PostalZone + cac:PostalAddress/cbc:CityName + cac:PostalAddress/cac:Country/cbc:IdentificationCode + cac:Contact/cbc:Telefax + efac:ConcessionRevenue + efac:Funding + efac:ContractModification + efac:Change/efac:ChangedSection/efbc:ChangedSectionIdentifier + cac:ContractingParty + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:FieldsPrivacy + cac:SpecificTendererRequirement + cac:ContractExecutionRequirement + efac:DurationJustification + cac:FrameworkAgreement + efac:Funding + cac:AdditionalDocumentReference + cac:LotsGroup + cac:ProcurementProjectLotReference/cbc:ID[@schemeName='Lot'] + efac:InterestExpressionReceptionPeriod + cac:PartyLegalEntity + cac:AwardingCriterion + cac:SubordinateAwardingCriterion/cbc:AwardingCriterionTypeCode[@listName='award-criterion-type'] + efac:FieldsPrivacy + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:FieldsPrivacy + efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-fixed']/efbc:ParameterNumeric + efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-threshold']/efbc:ParameterNumeric + efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-weight']/efbc:ParameterNumeric + efac:FieldsPrivacy + cac:LotDistribution + cac:LotsGroup/cbc:LotsGroupID + cac:PlannedPeriod + cac:EmploymentLegislationDocumentReference + cac:EnvironmentalLegislationDocumentReference + cac:FiscalLegislationDocumentReference + cac:Address/cbc:CountrySubentityCode + cac:Address/cbc:StreetName + cac:Address/cbc:AdditionalStreetName + cac:Address/cac:AddressLine/cbc:Line + cac:Address/cbc:PostalZone + cac:Address/cbc:CityName + cac:Address/cac:Country/cbc:IdentificationCode + cac:Address/cbc:Region + cac:NoticeDocumentReference + cac:CallForTendersDocumentReference + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:OfficialLanguages/cac:Language/cbc:ID + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NonOfficialLanguages/cac:Language/cbc:ID + cac:ProcurementProject + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='strategic-procurement']/cbc:ProcurementTypeCode + cac:MainCommodityClassification/cbc:ItemClassificationCode + cac:AdditionalCommodityClassification/cbc:ItemClassificationCode + cac:RequestedTenderTotal/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efbc:FrameworkMaximumAmount + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='contract-nature']/cbc:ProcurementTypeCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='accessibility']/cbc:ProcurementTypeCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='environmental-impact']/cbc:ProcurementTypeCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='social-objective']/cbc:ProcurementTypeCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='innovative-acquisition']/cbc:ProcurementTypeCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='gpp-criteria']/cbc:ProcurementTypeCode + cac:TendererQualificationRequest + cac:SpecificTendererRequirement[cbc:TendererRequirementTypeCode/@listName='reserved-procurement']/cbc:TendererRequirementTypeCode + efac:LotResult + efac:FrameworkAgreementValues + efac:AppealRequestsStatistics[efbc:StatisticsCode/@listName='irregularity-type']/efbc:StatisticsCode + efac:AppealRequestsStatistics[efbc:StatisticsCode/@listName='review-type']/efbc:StatisticsCode + efac:ReceivedSubmissionsStatistics/efbc:StatisticsNumeric + efac:ReceivedSubmissionsStatistics/efbc:StatisticsCode + cac:FinancingParty/cac:PartyIdentification/cbc:ID + cac:PayerParty/cac:PartyIdentification/cbc:ID + efac:SettledContract/cbc:ID + efac:LotTender/cbc:ID + cac:AppealTerms + cac:PresentationPeriod/cbc:Description + efac:LotTender + efac:Origin + efac:Origin/efbc:AreaCode + efac:AggregatedAmounts/cbc:PaidAmount + efac:AggregatedAmounts/efbc:PaidAmountDescription + efac:AggregatedAmounts/efbc:PenaltiesAmount + efac:ContractTerm[not(efbc:TermCode/text()='all-rev-tic')][efbc:TermCode/@listName='contract-detail']/efbc:TermCode + efac:ContractTerm[efbc:TermCode/@listName='rewards-penalties']/efbc:TermCode + cac:TenderingProcess + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension + cac:NoticeDocumentReference/cbc:ReferencedDocumentInternalAddress + cac:ParticipationRequestReceptionPeriod/cbc:EndDate + cac:ParticipationRequestReceptionPeriod/cbc:EndTime + cac:TenderSubmissionDeadlinePeriod/cbc:EndDate + cac:TenderSubmissionDeadlinePeriod/cbc:EndTime + cac:OpenTenderEvent/cbc:OccurrenceDate + cac:AdditionalInformationRequestPeriod/cbc:EndDate + cac:AdditionalInformationRequestPeriod/cbc:EndTime + cac:ContractingSystem[cbc:ContractingSystemTypeCode/@listName='framework-agreement']/cbc:ContractingSystemTypeCode + cac:ContractingSystem[cbc:ContractingSystemTypeCode/@listName='dps-usage']/cbc:ContractingSystemTypeCode + cac:TenderingTerms + cac:TenderRecipientParty/cbc:EndpointID + cac:AllowedSubcontractTerms[cbc:SubcontractingConditionsCode/@listName='subcontracting-obligation']/cbc:SubcontractingConditionsCode + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='reserved-execution']/cbc:ExecutionRequirementCode + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='einvoicing']/cbc:ExecutionRequirementCode + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='esignature-submission']/cbc:ExecutionRequirementCode + cac:RequiredFinancialGuarantee/cbc:Description + cac:RequiredFinancialGuarantee/cbc:GuaranteeTypeCode[@listName='tender-guarantee-required'] + cac:TendererQualificationRequest[not(cac:SpecificTendererRequirement)]/cbc:CompanyLegalForm + cac:TendererQualificationRequest[not(cac:SpecificTendererRequirement)]/cbc:CompanyLegalFormCode + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='ecatalog-submission']/cbc:ExecutionRequirementCode + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='nda']/cbc:ExecutionRequirementCode + cac:Language/cbc:ID + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='conditions']/cbc:ExecutionRequirementCode + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='customer-service']/cbc:ExecutionRequirementCode + cac:TenderRecipientParty/cac:PartyIdentification/cbc:ID + cac:RequestedTenderTotal + cac:SubordinateAwardingCriterion/cbc:AwardingCriterionTypeCode[@listName='award-criterion-type'] + efac:FieldsPrivacy + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:FieldsPrivacy + efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-fixed']/efbc:ParameterNumeric + efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-threshold']/efbc:ParameterNumeric + efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-weight']/efbc:ParameterNumeric + efac:FieldsPrivacy + cac:TenderingTerms/cac:AwardingTerms + cac:TenderingProcess/cac:FrameworkAgreement + cac:RequestedTenderTotal/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efbc:FrameworkMaximumAmount + cac:RequestedTenderTotal + efac:Change + efac:ChangeReason + efac:ChangedSection + cac:ProcessJustification + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension + efac:Funding/efbc:FinancingIdentifier + efac:TenderSubcontractingRequirements/efbc:TenderSubcontractingRequirementsCode + efac:Funding/cbc:FundingProgramCode + efac:SelectionCriteria/cbc:CriterionTypeCode[@listName='selection-criterion'] + efac:DecisionReason/efac:FieldsPrivacy + efac:FieldsPrivacy + efac:NoticeResult + efac:GroupFramework + efac:NoticePurpose + cac:ContractExtension + cac:Renewal/cac:Period/cbc:Description + efac:Organization + efac:TouchPoint/cac:PartyIdentification/cbc:ID + efac:UltimateBeneficialOwner/cbc:ID + efac:Organizations + efac:UltimateBeneficialOwner/cbc:ID + efac:ContractTerm + efac:AnswerReceptionPeriod + cac:ProcurementProjectLot[cbc:ID/@schemeName='Part'] + cac:EmploymentLegislationDocumentReference + cac:EnvironmentalLegislationDocumentReference + cac:FiscalLegislationDocumentReference + cac:Address/cbc:CountrySubentityCode + cac:Address/cbc:StreetName + cac:Address/cbc:AdditionalStreetName + cac:Address/cac:AddressLine/cbc:Line + cac:Address/cbc:PostalZone + cac:Address/cbc:CityName + cac:Address/cac:Country/cbc:IdentificationCode + cac:Address/cbc:Region + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:OfficialLanguages/cac:Language/cbc:ID + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NonOfficialLanguages/cac:Language/cbc:ID + cac:ProcurementProject + cac:MainCommodityClassification/cbc:ItemClassificationCode + cac:AdditionalCommodityClassification/cbc:ItemClassificationCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='contract-nature']/cbc:ProcurementTypeCode + cac:SpecificTendererRequirement[cbc:TendererRequirementTypeCode/@listName='reserved-procurement']/cbc:TendererRequirementTypeCode + cac:AppealTerms + cac:NoticeDocumentReference/cbc:ReferencedDocumentInternalAddress + cac:AdditionalInformationRequestPeriod/cbc:EndDate + cac:AdditionalInformationRequestPeriod/cbc:EndTime + cac:ContractingSystem[cbc:ContractingSystemTypeCode/@listName='framework-agreement']/cbc:ContractingSystemTypeCode + cac:ContractingSystem[cbc:ContractingSystemTypeCode/@listName='dps-usage']/cbc:ContractingSystemTypeCode + cac:TenderingTerms + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='reserved-execution']/cbc:ExecutionRequirementCode + cac:EconomicOperatorShortList + cac:PreSelectedParty/cac:PartyName/cbc:Name + cac:PaymentTerms + cac:PostAwardProcess + cac:Prize + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:FieldsPrivacy + cac:RealizedLocation + cac:ProcurementProject + cac:MainCommodityClassification/cbc:ItemClassificationCode + cac:AdditionalCommodityClassification/cbc:ItemClassificationCode + cac:RequestedTenderTotal/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efbc:FrameworkMaximumAmount + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='contract-nature']/cbc:ProcurementTypeCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='transport-service']/cbc:ProcurementTypeCode + cac:TenderingProcess + cac:NoticeDocumentReference/cbc:ID + cac:TenderingTerms + cac:ProcurementLegislationDocumentReference[not(cbc:ID/text()=('CrossBorderLaw','LocalLegalBasis'))]/cbc:ID + cac:ProcurementLegislationDocumentReference[cbc:ID/text()='LocalLegalBasis']/cbc:ID + cac:ProcurementLegislationDocumentReference[cbc:ID/text()='CrossBorderLaw']/cbc:ID + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:FieldsPrivacy + cac:RequestedTenderTotal + cac:OpenTenderEvent + cac:OccurenceLocation/cbc:Description + efac:ReceivedSubmissionsStatistics + efac:AppealsInformation + efac:AppealRequestsStatistics + efac:AppealedItem/cbc:ID + efac:AppealDecision/efbc:DecisionTypeCode + efac:AppealIrregularity/efbc:IrregularityTypeCode + efac:AppealRemedy/efbc:RemedyTypeCode + efac:AppealProcessingParty/efbc:AppealProcessingPartyTypeCode + efac:AppealingParty/efbc:AppealingPartyTypeCode + efac:AppealProcessingParty/efbc:AppealProcessingPartyTypeDescription + efac:AppealProcessingParty/cac:Party/cac:PartyIdentification/cbc:ID + efac:AppealingParty/cac:Party/cac:PartyIdentification/cbc:ID + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension + efac:Publication/efbc:NoticePublicationID[@schemeName='ojs-notice-id'] + efac:Publication/efbc:GazetteID[@schemeName='ojs-id'] + efac:Publication/efbc:PublicationDate + cac:BusinessCapability/cbc:CapabilityTypeCode + cac:ContractingParty/cac:Party/cac:PartyIdentification/cbc:ID + cac:EconomicOperatorShortList + efac:CriterionParameter + cac:SecurityClearanceTerm + efac:SelectionCriteria + efac:CriterionParameter[efbc:ParameterCode/@listName='number-threshold']/efbc:ParameterNumeric + efac:CriterionParameter[efbc:ParameterCode/@listName='number-weight']/efbc:ParameterNumeric + cac:SenderParty/cac:Contact + efac:SettledContract + efac:LotTender/cbc:ID + efac:Funding/efbc:FinancingIdentifier + efac:Funding/cbc:FundingProgramCode + cac:SignatoryParty/cac:PartyIdentification/cbc:ID + efac:StrategicProcurement + efac:StrategicProcurement + efac:MainContractor/cbc:ID + efac:SubcontractingTerm + cac:AllowedSubcontractTerms + cac:TendererQualificationRequest + efac:Tenderer/cbc:ID + efac:SubContractor/cbc:ID + cac:PostalAddress/cbc:Department + cac:Contact/cbc:Name + cac:Contact/cbc:Telephone + cac:Contact/cbc:ElectronicMail + cac:PostalAddress/cbc:CountrySubentityCode + cac:PostalAddress/cbc:StreetName + cac:PostalAddress/cbc:AdditionalStreetName + cac:PostalAddress/cac:AddressLine/cbc:Line + cac:PostalAddress/cbc:PostalZone + cac:PostalAddress/cbc:CityName + cac:PostalAddress/cac:Country/cbc:IdentificationCode + cac:Contact/cbc:Telefax + cac:Contact/cbc:Telephone + cac:Contact/cbc:ElectronicMail + cac:ResidenceAddress/cbc:CountrySubentityCode + cac:ResidenceAddress/cbc:StreetName + cac:ResidenceAddress/cbc:AdditionalStreetName + cac:ResidenceAddress/cac:AddressLine/cbc:Line + cac:ResidenceAddress/cbc:PostalZone + cac:ResidenceAddress/cbc:CityName + cac:ResidenceAddress/cac:Country/cbc:IdentificationCode + efac:Nationality/cbc:NationalityID + cac:Contact/cbc:Telefax + efac:FieldsPrivacy + + \ No newline at end of file diff --git a/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/static/validation-stage-1a.sch b/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/static/validation-stage-1a.sch new file mode 100644 index 0000000..9ab9877 --- /dev/null +++ b/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/static/validation-stage-1a.sch @@ -0,0 +1,21 @@ + + + + + rule|text|P-0001 + + + rule|text|P-0002 + + + + + rule|text|P-0004 + + + + + rule|text|P-0005 + + + diff --git a/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/static/validation-stage-1b-1.sch b/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/static/validation-stage-1b-1.sch new file mode 100644 index 0000000..e51be47 --- /dev/null +++ b/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/static/validation-stage-1b-1.sch @@ -0,0 +1,40 @@ + + + + + rule|text|ND-BusinessParty-1 + rule|text|ND-ContractingParty-1 + rule|text|ND-GazetteReference-1 + rule|text|ND-OperationType-1 + rule|text|ND-Part-1 + rule|text|ND-ProcedureProcurementScope-1 + rule|text|ND-ProcedureTenderingProcess-1 + rule|text|ND-RootExtension-1 + rule|text|ND-SenderContact-1 + + + rule|text|ND-Buyer-1 + + + rule|text|ND-ProcedureValueEstimate-1 + + + rule|text|ND-LotDistribution-1 + rule|text|ND-TendererQualificationRequest-1 + + + rule|text|ND-CrossBorderLawUnpublish-1 + + + rule|text|ND-ContractModification-1 + rule|text|ND-NoticeResult-1 + rule|text|ND-Organizations-1 + rule|text|ND-ReviewRequests-1 + + + rule|text|ND-Organization-1 + + + rule|text|ND-Company-1 + + diff --git a/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/static/validation-stage-1b-16.sch b/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/static/validation-stage-1b-16.sch new file mode 100644 index 0000000..67d8951 --- /dev/null +++ b/src/test/resources/eforms-sdk-tests/tedefo-2929/invalid/schematrons/static/validation-stage-1b-16.sch @@ -0,0 +1,85 @@ + + + + + rule|text|ND-BusinessParty-16 + rule|text|ND-ContractingParty-16 + rule|text|ND-GazetteReference-16 + rule|text|ND-OperationType-16 + rule|text|ND-Part-16 + rule|text|ND-ProcedureProcurementScope-16 + rule|text|ND-ProcedureTenderingProcess-16 + rule|text|ND-ProcedureTerms-16 + rule|text|ND-RootExtension-16 + rule|text|ND-SenderContact-16 + + + rule|text|ND-Buyer-16 + + + rule|text|ND-LotProcurementScope-16 + rule|text|ND-LotTenderingProcess-16 + rule|text|ND-LotTenderingTerms-16 + + + rule|text|ND-AuctionTerms-16 + + + rule|text|ND-InterestExpressionReceptionPeriod-16 + rule|text|ND-PMCAnswersDeadline-16 + + + rule|text|ND-LotProcurementDocument-16 + rule|text|ND-LotReservedParticipation-16 + rule|text|ND-LotReviewTerms-16 + rule|text|ND-NonUBLTenderingTerms-16 + rule|text|ND-Participants-16 + rule|text|ND-PostAwardProcess-16 + rule|text|ND-SubcontractingObligation-16 + + + rule|text|ND-LotAwardCriterionNumberComplicatedUnpublish-16 + + + rule|text|ND-LotAwardCriterionTypeUnpublish-16 + + + rule|text|ND-LotAwardCriterionFixNumberUnpublish-16 + + + rule|text|ND-LotsGroupAwardCriterionNumberComplicatedUnpublish-16 + + + rule|text|ND-LotsGroupAwardCriterionTypeUnpublish-16 + + + rule|text|ND-LotsGroupAwardCriterionFixNumberUnpublish-16 + + + rule|text|ND-ProcedureTypeUnpublish-16 + + + rule|text|ND-ProcedureAcceleratedUnpublish-16 + + + rule|text|ND-TendererQualificationRequest-16 + + + rule|text|ND-CrossBorderLawUnpublish-16 + + + rule|text|ND-ExclusionGrounds-16 + + + rule|text|ND-ContractModification-16 + rule|text|ND-NoticeResult-16 + rule|text|ND-Organizations-16 + rule|text|ND-ReviewRequests-16 + + + rule|text|ND-Organization-16 + + + rule|text|ND-Company-16 + + diff --git a/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/README.md b/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/README.md new file mode 100644 index 0000000..de6cc39 --- /dev/null +++ b/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/README.md @@ -0,0 +1,31 @@ +# eForms Schematron rules + +The Schematron rules used to validate eForms notices. + +## Structure + +The validation of eForms notices is conceptually structured in several stages: +- Stage 1: Check the presence and absence of container elements; +- Stage 2: Check the presence and absence of the leaf elements (a.k.a. Business Terms) together with the notice type and legal basis as per the eForms regulation. It also includes checks of the repeatable elements and the multilingual ones. +- Stage 3: Check values of leaf elements (Business Terms). This includes: + - checking that a value matches a specific pattern, for example for a URL or an email address; + - checking that a value is part of a given codelist. +- Stage 4: Check the presence and absence of leaf elements or their related values depending on specific conditions which apply to the notice being checked. This includes, among others, the "conditional mandatory" rules from the eForms regulation. +- Stage 5 : Check the values of leaf elements in the notice are consistent with each other. + +Those stages are implemented in one or more schematron files. Each file contains a single `pattern` root element. Some stages require rules with distinct contexts to be applied to the same node, so they are implemented in more than one pattern. + +Those Schematron files are all referenced in a single file `complete-validation.sch`, using the Schematron `include` element. + +Schematron rules are organised in 2 folders: +* `static`: all rules that only use information in the notice being validated, as described above. +* `dynamic`: all rules in `static`, plus rules that use information in other notices. + +In the `dynamic` folder, additional schematron files named `validation-stage-6*.sch` checks that a change notice is consistent with the original notice. This requires fetching the original notice based on its identifier, by making an HTTP request to an external service. +The URL of this service is configured by a variable defined in the file `config.sch`, which is included in `complete-validation.sch`. + +## Usage + +The schematron rules can be executed via any standard Schematron implementation, using the file `complete-validation.sch`. + +If you use the XSLT implementation at https://github.com/Schematron/schematron, you must implement the following fix so that rules on attributes are fired: https://github.com/Schematron/schematron/issues/29. diff --git a/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/dynamic/complete-validation.sch b/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/dynamic/complete-validation.sch new file mode 100644 index 0000000..c0a36f9 --- /dev/null +++ b/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/dynamic/complete-validation.sch @@ -0,0 +1,318 @@ + + + + + eForms schematron rules + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cac:ProcessJustification + cac:AuctionTerms + cac:AwardingTerms + cac:TechnicalCommitteePerson/cbc:FamilyName + cac:PostalAddress + cac:Contact + cac:BusinessParty + cac:PartyLegalEntity[cbc:CompanyID/@schemeName = 'EU']/cbc:CompanyID + cac:PartyLegalEntity[cbc:CompanyID/@schemeName = 'national']/cbc:CompanyID + cac:Party + cac:ServiceProviderParty/cac:Party/cac:PartyIdentification/cbc:ID + efac:Change + efac:Company + cac:PostalAddress/cbc:Department + cac:PartyLegalEntity/cbc:CompanyID + cac:Contact/cbc:Name + cac:Contact/cbc:Telephone + cac:Contact/cbc:ElectronicMail + cac:PostalAddress/cbc:CountrySubentityCode + cac:PostalAddress/cbc:StreetName + cac:PostalAddress/cbc:AdditionalStreetName + cac:PostalAddress/cac:AddressLine/cbc:Line + cac:PostalAddress/cbc:PostalZone + cac:PostalAddress/cbc:CityName + cac:PostalAddress/cac:Country/cbc:IdentificationCode + cac:Contact/cbc:Telefax + efac:ConcessionRevenue + efac:Funding + efac:ContractModification + efac:Change/efac:ChangedSection/efbc:ChangedSectionIdentifier + cac:ContractingParty + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:FieldsPrivacy + cac:SpecificTendererRequirement + cac:ContractExecutionRequirement + efac:DurationJustification + cac:FrameworkAgreement + efac:Funding + cac:AdditionalDocumentReference + cac:LotsGroup + cac:ProcurementProjectLotReference/cbc:ID[@schemeName='Lot'] + efac:InterestExpressionReceptionPeriod + cac:PartyLegalEntity + cac:AwardingCriterion + cac:SubordinateAwardingCriterion/cbc:AwardingCriterionTypeCode[@listName='award-criterion-type'] + efac:FieldsPrivacy + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:FieldsPrivacy + efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-fixed']/efbc:ParameterNumeric + efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-threshold']/efbc:ParameterNumeric + efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-weight']/efbc:ParameterNumeric + efac:FieldsPrivacy + cac:LotDistribution + cac:LotsGroup/cbc:LotsGroupID + cac:PlannedPeriod + cac:EmploymentLegislationDocumentReference + cac:EnvironmentalLegislationDocumentReference + cac:FiscalLegislationDocumentReference + cac:Address/cbc:CountrySubentityCode + cac:Address/cbc:StreetName + cac:Address/cbc:AdditionalStreetName + cac:Address/cac:AddressLine/cbc:Line + cac:Address/cbc:PostalZone + cac:Address/cbc:CityName + cac:Address/cac:Country/cbc:IdentificationCode + cac:Address/cbc:Region + cac:NoticeDocumentReference + cac:CallForTendersDocumentReference + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:OfficialLanguages/cac:Language/cbc:ID + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NonOfficialLanguages/cac:Language/cbc:ID + cac:ProcurementProject + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='strategic-procurement']/cbc:ProcurementTypeCode + cac:MainCommodityClassification/cbc:ItemClassificationCode + cac:AdditionalCommodityClassification/cbc:ItemClassificationCode + cac:RequestedTenderTotal/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efbc:FrameworkMaximumAmount + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='contract-nature']/cbc:ProcurementTypeCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='accessibility']/cbc:ProcurementTypeCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='environmental-impact']/cbc:ProcurementTypeCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='social-objective']/cbc:ProcurementTypeCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='innovative-acquisition']/cbc:ProcurementTypeCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='gpp-criteria']/cbc:ProcurementTypeCode + cac:TendererQualificationRequest + cac:SpecificTendererRequirement[cbc:TendererRequirementTypeCode/@listName='reserved-procurement']/cbc:TendererRequirementTypeCode + efac:LotResult + efac:FrameworkAgreementValues + efac:AppealRequestsStatistics[efbc:StatisticsCode/@listName='irregularity-type']/efbc:StatisticsCode + efac:AppealRequestsStatistics[efbc:StatisticsCode/@listName='review-type']/efbc:StatisticsCode + efac:ReceivedSubmissionsStatistics/efbc:StatisticsNumeric + efac:ReceivedSubmissionsStatistics/efbc:StatisticsCode + cac:FinancingParty/cac:PartyIdentification/cbc:ID + cac:PayerParty/cac:PartyIdentification/cbc:ID + efac:SettledContract/cbc:ID + efac:LotTender/cbc:ID + cac:AppealTerms + cac:PresentationPeriod/cbc:Description + efac:LotTender + efac:Origin + efac:Origin/efbc:AreaCode + efac:AggregatedAmounts/cbc:PaidAmount + efac:AggregatedAmounts/efbc:PaidAmountDescription + efac:AggregatedAmounts/efbc:PenaltiesAmount + efac:ContractTerm[not(efbc:TermCode/text()='all-rev-tic')][efbc:TermCode/@listName='contract-detail']/efbc:TermCode + efac:ContractTerm[efbc:TermCode/@listName='rewards-penalties']/efbc:TermCode + cac:TenderingProcess + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension + cac:NoticeDocumentReference/cbc:ReferencedDocumentInternalAddress + cac:ParticipationRequestReceptionPeriod/cbc:EndDate + cac:ParticipationRequestReceptionPeriod/cbc:EndTime + cac:TenderSubmissionDeadlinePeriod/cbc:EndDate + cac:TenderSubmissionDeadlinePeriod/cbc:EndTime + cac:OpenTenderEvent/cbc:OccurrenceDate + cac:AdditionalInformationRequestPeriod/cbc:EndDate + cac:AdditionalInformationRequestPeriod/cbc:EndTime + cac:ContractingSystem[cbc:ContractingSystemTypeCode/@listName='framework-agreement']/cbc:ContractingSystemTypeCode + cac:ContractingSystem[cbc:ContractingSystemTypeCode/@listName='dps-usage']/cbc:ContractingSystemTypeCode + cac:TenderingTerms + cac:TenderRecipientParty/cbc:EndpointID + cac:AllowedSubcontractTerms[cbc:SubcontractingConditionsCode/@listName='subcontracting-obligation']/cbc:SubcontractingConditionsCode + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='reserved-execution']/cbc:ExecutionRequirementCode + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='einvoicing']/cbc:ExecutionRequirementCode + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='esignature-submission']/cbc:ExecutionRequirementCode + cac:RequiredFinancialGuarantee/cbc:Description + cac:RequiredFinancialGuarantee/cbc:GuaranteeTypeCode[@listName='tender-guarantee-required'] + cac:TendererQualificationRequest[not(cac:SpecificTendererRequirement)]/cbc:CompanyLegalForm + cac:TendererQualificationRequest[not(cac:SpecificTendererRequirement)]/cbc:CompanyLegalFormCode + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='ecatalog-submission']/cbc:ExecutionRequirementCode + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='nda']/cbc:ExecutionRequirementCode + cac:Language/cbc:ID + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='conditions']/cbc:ExecutionRequirementCode + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='customer-service']/cbc:ExecutionRequirementCode + cac:TenderRecipientParty/cac:PartyIdentification/cbc:ID + cac:RequestedTenderTotal + cac:SubordinateAwardingCriterion/cbc:AwardingCriterionTypeCode[@listName='award-criterion-type'] + efac:FieldsPrivacy + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:FieldsPrivacy + efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-fixed']/efbc:ParameterNumeric + efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-threshold']/efbc:ParameterNumeric + efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-weight']/efbc:ParameterNumeric + efac:FieldsPrivacy + cac:TenderingTerms/cac:AwardingTerms + cac:TenderingProcess/cac:FrameworkAgreement + cac:RequestedTenderTotal/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efbc:FrameworkMaximumAmount + cac:RequestedTenderTotal + efac:Change + efac:ChangeReason + efac:ChangedSection + cac:ProcessJustification + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension + efac:Funding/efbc:FinancingIdentifier + efac:TenderSubcontractingRequirements/efbc:TenderSubcontractingRequirementsCode + efac:Funding/cbc:FundingProgramCode + efac:SelectionCriteria/cbc:CriterionTypeCode[@listName='selection-criterion'] + efac:DecisionReason/efac:FieldsPrivacy + efac:FieldsPrivacy + efac:NoticeResult + efac:GroupFramework + efac:NoticePurpose + cac:ContractExtension + cac:Renewal/cac:Period/cbc:Description + efac:Organization + efac:TouchPoint/cac:PartyIdentification/cbc:ID + efac:UltimateBeneficialOwner/cbc:ID + efac:Organizations + efac:UltimateBeneficialOwner/cbc:ID + efac:ContractTerm + efac:AnswerReceptionPeriod + cac:ProcurementProjectLot[cbc:ID/@schemeName='Part'] + cac:EmploymentLegislationDocumentReference + cac:EnvironmentalLegislationDocumentReference + cac:FiscalLegislationDocumentReference + cac:Address/cbc:CountrySubentityCode + cac:Address/cbc:StreetName + cac:Address/cbc:AdditionalStreetName + cac:Address/cac:AddressLine/cbc:Line + cac:Address/cbc:PostalZone + cac:Address/cbc:CityName + cac:Address/cac:Country/cbc:IdentificationCode + cac:Address/cbc:Region + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:OfficialLanguages/cac:Language/cbc:ID + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NonOfficialLanguages/cac:Language/cbc:ID + cac:ProcurementProject + cac:MainCommodityClassification/cbc:ItemClassificationCode + cac:AdditionalCommodityClassification/cbc:ItemClassificationCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='contract-nature']/cbc:ProcurementTypeCode + cac:SpecificTendererRequirement[cbc:TendererRequirementTypeCode/@listName='reserved-procurement']/cbc:TendererRequirementTypeCode + cac:AppealTerms + cac:NoticeDocumentReference/cbc:ReferencedDocumentInternalAddress + cac:AdditionalInformationRequestPeriod/cbc:EndDate + cac:AdditionalInformationRequestPeriod/cbc:EndTime + cac:ContractingSystem[cbc:ContractingSystemTypeCode/@listName='framework-agreement']/cbc:ContractingSystemTypeCode + cac:ContractingSystem[cbc:ContractingSystemTypeCode/@listName='dps-usage']/cbc:ContractingSystemTypeCode + cac:TenderingTerms + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='reserved-execution']/cbc:ExecutionRequirementCode + cac:EconomicOperatorShortList + cac:PreSelectedParty/cac:PartyName/cbc:Name + cac:PaymentTerms + cac:PostAwardProcess + cac:Prize + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:FieldsPrivacy + cac:RealizedLocation + cac:ProcurementProject + cac:MainCommodityClassification/cbc:ItemClassificationCode + cac:AdditionalCommodityClassification/cbc:ItemClassificationCode + cac:RequestedTenderTotal/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efbc:FrameworkMaximumAmount + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='contract-nature']/cbc:ProcurementTypeCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='transport-service']/cbc:ProcurementTypeCode + cac:TenderingProcess + cac:NoticeDocumentReference/cbc:ID + cac:TenderingTerms + cac:ProcurementLegislationDocumentReference[not(cbc:ID/text()=('CrossBorderLaw','LocalLegalBasis'))]/cbc:ID + cac:ProcurementLegislationDocumentReference[cbc:ID/text()='LocalLegalBasis']/cbc:ID + cac:ProcurementLegislationDocumentReference[cbc:ID/text()='CrossBorderLaw']/cbc:ID + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:FieldsPrivacy + cac:RequestedTenderTotal + cac:OpenTenderEvent + cac:OccurenceLocation/cbc:Description + efac:ReceivedSubmissionsStatistics + efac:AppealsInformation + efac:AppealRequestsStatistics + efac:AppealedItem/cbc:ID + efac:AppealDecision/efbc:DecisionTypeCode + efac:AppealIrregularity/efbc:IrregularityTypeCode + efac:AppealRemedy/efbc:RemedyTypeCode + efac:AppealProcessingParty/efbc:AppealProcessingPartyTypeCode + efac:AppealingParty/efbc:AppealingPartyTypeCode + efac:AppealProcessingParty/efbc:AppealProcessingPartyTypeDescription + efac:AppealProcessingParty/cac:Party/cac:PartyIdentification/cbc:ID + efac:AppealingParty/cac:Party/cac:PartyIdentification/cbc:ID + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension + efac:Publication/efbc:NoticePublicationID[@schemeName='ojs-notice-id'] + efac:Publication/efbc:GazetteID[@schemeName='ojs-id'] + efac:Publication/efbc:PublicationDate + cac:BusinessCapability/cbc:CapabilityTypeCode + cac:ContractingParty/cac:Party/cac:PartyIdentification/cbc:ID + cac:EconomicOperatorShortList + efac:CriterionParameter + cac:SecurityClearanceTerm + efac:SelectionCriteria + efac:CriterionParameter[efbc:ParameterCode/@listName='number-threshold']/efbc:ParameterNumeric + efac:CriterionParameter[efbc:ParameterCode/@listName='number-weight']/efbc:ParameterNumeric + cac:SenderParty/cac:Contact + efac:SettledContract + efac:LotTender/cbc:ID + efac:Funding/efbc:FinancingIdentifier + efac:Funding/cbc:FundingProgramCode + cac:SignatoryParty/cac:PartyIdentification/cbc:ID + efac:StrategicProcurement + efac:StrategicProcurement + efac:MainContractor/cbc:ID + efac:SubcontractingTerm + cac:AllowedSubcontractTerms + cac:TendererQualificationRequest + efac:Tenderer/cbc:ID + efac:SubContractor/cbc:ID + cac:PostalAddress/cbc:Department + cac:Contact/cbc:Name + cac:Contact/cbc:Telephone + cac:Contact/cbc:ElectronicMail + cac:PostalAddress/cbc:CountrySubentityCode + cac:PostalAddress/cbc:StreetName + cac:PostalAddress/cbc:AdditionalStreetName + cac:PostalAddress/cac:AddressLine/cbc:Line + cac:PostalAddress/cbc:PostalZone + cac:PostalAddress/cbc:CityName + cac:PostalAddress/cac:Country/cbc:IdentificationCode + cac:Contact/cbc:Telefax + cac:Contact/cbc:Telephone + cac:Contact/cbc:ElectronicMail + cac:ResidenceAddress/cbc:CountrySubentityCode + cac:ResidenceAddress/cbc:StreetName + cac:ResidenceAddress/cbc:AdditionalStreetName + cac:ResidenceAddress/cac:AddressLine/cbc:Line + cac:ResidenceAddress/cbc:PostalZone + cac:ResidenceAddress/cbc:CityName + cac:ResidenceAddress/cac:Country/cbc:IdentificationCode + efac:Nationality/cbc:NationalityID + cac:Contact/cbc:Telefax + efac:FieldsPrivacy + + \ No newline at end of file diff --git a/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/dynamic/config.sch b/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/dynamic/config.sch new file mode 100644 index 0000000..bb6e87b --- /dev/null +++ b/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/dynamic/config.sch @@ -0,0 +1,5 @@ + + + diff --git a/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/dynamic/validation-stage-1a.sch b/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/dynamic/validation-stage-1a.sch new file mode 100644 index 0000000..9ab9877 --- /dev/null +++ b/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/dynamic/validation-stage-1a.sch @@ -0,0 +1,21 @@ + + + + + rule|text|P-0001 + + + rule|text|P-0002 + + + + + rule|text|P-0004 + + + + + rule|text|P-0005 + + + diff --git a/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/dynamic/validation-stage-1b-1.sch b/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/dynamic/validation-stage-1b-1.sch new file mode 100644 index 0000000..e51be47 --- /dev/null +++ b/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/dynamic/validation-stage-1b-1.sch @@ -0,0 +1,40 @@ + + + + + rule|text|ND-BusinessParty-1 + rule|text|ND-ContractingParty-1 + rule|text|ND-GazetteReference-1 + rule|text|ND-OperationType-1 + rule|text|ND-Part-1 + rule|text|ND-ProcedureProcurementScope-1 + rule|text|ND-ProcedureTenderingProcess-1 + rule|text|ND-RootExtension-1 + rule|text|ND-SenderContact-1 + + + rule|text|ND-Buyer-1 + + + rule|text|ND-ProcedureValueEstimate-1 + + + rule|text|ND-LotDistribution-1 + rule|text|ND-TendererQualificationRequest-1 + + + rule|text|ND-CrossBorderLawUnpublish-1 + + + rule|text|ND-ContractModification-1 + rule|text|ND-NoticeResult-1 + rule|text|ND-Organizations-1 + rule|text|ND-ReviewRequests-1 + + + rule|text|ND-Organization-1 + + + rule|text|ND-Company-1 + + diff --git a/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/dynamic/validation-stage-1b-16.sch b/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/dynamic/validation-stage-1b-16.sch new file mode 100644 index 0000000..67d8951 --- /dev/null +++ b/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/dynamic/validation-stage-1b-16.sch @@ -0,0 +1,85 @@ + + + + + rule|text|ND-BusinessParty-16 + rule|text|ND-ContractingParty-16 + rule|text|ND-GazetteReference-16 + rule|text|ND-OperationType-16 + rule|text|ND-Part-16 + rule|text|ND-ProcedureProcurementScope-16 + rule|text|ND-ProcedureTenderingProcess-16 + rule|text|ND-ProcedureTerms-16 + rule|text|ND-RootExtension-16 + rule|text|ND-SenderContact-16 + + + rule|text|ND-Buyer-16 + + + rule|text|ND-LotProcurementScope-16 + rule|text|ND-LotTenderingProcess-16 + rule|text|ND-LotTenderingTerms-16 + + + rule|text|ND-AuctionTerms-16 + + + rule|text|ND-InterestExpressionReceptionPeriod-16 + rule|text|ND-PMCAnswersDeadline-16 + + + rule|text|ND-LotProcurementDocument-16 + rule|text|ND-LotReservedParticipation-16 + rule|text|ND-LotReviewTerms-16 + rule|text|ND-NonUBLTenderingTerms-16 + rule|text|ND-Participants-16 + rule|text|ND-PostAwardProcess-16 + rule|text|ND-SubcontractingObligation-16 + + + rule|text|ND-LotAwardCriterionNumberComplicatedUnpublish-16 + + + rule|text|ND-LotAwardCriterionTypeUnpublish-16 + + + rule|text|ND-LotAwardCriterionFixNumberUnpublish-16 + + + rule|text|ND-LotsGroupAwardCriterionNumberComplicatedUnpublish-16 + + + rule|text|ND-LotsGroupAwardCriterionTypeUnpublish-16 + + + rule|text|ND-LotsGroupAwardCriterionFixNumberUnpublish-16 + + + rule|text|ND-ProcedureTypeUnpublish-16 + + + rule|text|ND-ProcedureAcceleratedUnpublish-16 + + + rule|text|ND-TendererQualificationRequest-16 + + + rule|text|ND-CrossBorderLawUnpublish-16 + + + rule|text|ND-ExclusionGrounds-16 + + + rule|text|ND-ContractModification-16 + rule|text|ND-NoticeResult-16 + rule|text|ND-Organizations-16 + rule|text|ND-ReviewRequests-16 + + + rule|text|ND-Organization-16 + + + rule|text|ND-Company-16 + + diff --git a/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/static/complete-validation.sch b/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/static/complete-validation.sch new file mode 100644 index 0000000..4c2ca60 --- /dev/null +++ b/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/static/complete-validation.sch @@ -0,0 +1,316 @@ + + + + + eForms schematron rules + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cac:ProcessJustification + cac:AuctionTerms + cac:AwardingTerms + cac:TechnicalCommitteePerson/cbc:FamilyName + cac:PostalAddress + cac:Contact + cac:BusinessParty + cac:PartyLegalEntity[cbc:CompanyID/@schemeName = 'EU']/cbc:CompanyID + cac:PartyLegalEntity[cbc:CompanyID/@schemeName = 'national']/cbc:CompanyID + cac:Party + cac:ServiceProviderParty/cac:Party/cac:PartyIdentification/cbc:ID + efac:Change + efac:Company + cac:PostalAddress/cbc:Department + cac:PartyLegalEntity/cbc:CompanyID + cac:Contact/cbc:Name + cac:Contact/cbc:Telephone + cac:Contact/cbc:ElectronicMail + cac:PostalAddress/cbc:CountrySubentityCode + cac:PostalAddress/cbc:StreetName + cac:PostalAddress/cbc:AdditionalStreetName + cac:PostalAddress/cac:AddressLine/cbc:Line + cac:PostalAddress/cbc:PostalZone + cac:PostalAddress/cbc:CityName + cac:PostalAddress/cac:Country/cbc:IdentificationCode + cac:Contact/cbc:Telefax + efac:ConcessionRevenue + efac:Funding + efac:ContractModification + efac:Change/efac:ChangedSection/efbc:ChangedSectionIdentifier + cac:ContractingParty + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:FieldsPrivacy + cac:SpecificTendererRequirement + cac:ContractExecutionRequirement + efac:DurationJustification + cac:FrameworkAgreement + efac:Funding + cac:AdditionalDocumentReference + cac:LotsGroup + cac:ProcurementProjectLotReference/cbc:ID[@schemeName='Lot'] + efac:InterestExpressionReceptionPeriod + cac:PartyLegalEntity + cac:AwardingCriterion + cac:SubordinateAwardingCriterion/cbc:AwardingCriterionTypeCode[@listName='award-criterion-type'] + efac:FieldsPrivacy + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:FieldsPrivacy + efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-fixed']/efbc:ParameterNumeric + efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-threshold']/efbc:ParameterNumeric + efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-weight']/efbc:ParameterNumeric + efac:FieldsPrivacy + cac:LotDistribution + cac:LotsGroup/cbc:LotsGroupID + cac:PlannedPeriod + cac:EmploymentLegislationDocumentReference + cac:EnvironmentalLegislationDocumentReference + cac:FiscalLegislationDocumentReference + cac:Address/cbc:CountrySubentityCode + cac:Address/cbc:StreetName + cac:Address/cbc:AdditionalStreetName + cac:Address/cac:AddressLine/cbc:Line + cac:Address/cbc:PostalZone + cac:Address/cbc:CityName + cac:Address/cac:Country/cbc:IdentificationCode + cac:Address/cbc:Region + cac:NoticeDocumentReference + cac:CallForTendersDocumentReference + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:OfficialLanguages/cac:Language/cbc:ID + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NonOfficialLanguages/cac:Language/cbc:ID + cac:ProcurementProject + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='strategic-procurement']/cbc:ProcurementTypeCode + cac:MainCommodityClassification/cbc:ItemClassificationCode + cac:AdditionalCommodityClassification/cbc:ItemClassificationCode + cac:RequestedTenderTotal/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efbc:FrameworkMaximumAmount + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='contract-nature']/cbc:ProcurementTypeCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='accessibility']/cbc:ProcurementTypeCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='environmental-impact']/cbc:ProcurementTypeCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='social-objective']/cbc:ProcurementTypeCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='innovative-acquisition']/cbc:ProcurementTypeCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='gpp-criteria']/cbc:ProcurementTypeCode + cac:TendererQualificationRequest + cac:SpecificTendererRequirement[cbc:TendererRequirementTypeCode/@listName='reserved-procurement']/cbc:TendererRequirementTypeCode + efac:LotResult + efac:FrameworkAgreementValues + efac:AppealRequestsStatistics[efbc:StatisticsCode/@listName='irregularity-type']/efbc:StatisticsCode + efac:AppealRequestsStatistics[efbc:StatisticsCode/@listName='review-type']/efbc:StatisticsCode + efac:ReceivedSubmissionsStatistics/efbc:StatisticsNumeric + efac:ReceivedSubmissionsStatistics/efbc:StatisticsCode + cac:FinancingParty/cac:PartyIdentification/cbc:ID + cac:PayerParty/cac:PartyIdentification/cbc:ID + efac:SettledContract/cbc:ID + efac:LotTender/cbc:ID + cac:AppealTerms + cac:PresentationPeriod/cbc:Description + efac:LotTender + efac:Origin + efac:Origin/efbc:AreaCode + efac:AggregatedAmounts/cbc:PaidAmount + efac:AggregatedAmounts/efbc:PaidAmountDescription + efac:AggregatedAmounts/efbc:PenaltiesAmount + efac:ContractTerm[not(efbc:TermCode/text()='all-rev-tic')][efbc:TermCode/@listName='contract-detail']/efbc:TermCode + efac:ContractTerm[efbc:TermCode/@listName='rewards-penalties']/efbc:TermCode + cac:TenderingProcess + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension + cac:NoticeDocumentReference/cbc:ReferencedDocumentInternalAddress + cac:ParticipationRequestReceptionPeriod/cbc:EndDate + cac:ParticipationRequestReceptionPeriod/cbc:EndTime + cac:TenderSubmissionDeadlinePeriod/cbc:EndDate + cac:TenderSubmissionDeadlinePeriod/cbc:EndTime + cac:OpenTenderEvent/cbc:OccurrenceDate + cac:AdditionalInformationRequestPeriod/cbc:EndDate + cac:AdditionalInformationRequestPeriod/cbc:EndTime + cac:ContractingSystem[cbc:ContractingSystemTypeCode/@listName='framework-agreement']/cbc:ContractingSystemTypeCode + cac:ContractingSystem[cbc:ContractingSystemTypeCode/@listName='dps-usage']/cbc:ContractingSystemTypeCode + cac:TenderingTerms + cac:TenderRecipientParty/cbc:EndpointID + cac:AllowedSubcontractTerms[cbc:SubcontractingConditionsCode/@listName='subcontracting-obligation']/cbc:SubcontractingConditionsCode + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='reserved-execution']/cbc:ExecutionRequirementCode + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='einvoicing']/cbc:ExecutionRequirementCode + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='esignature-submission']/cbc:ExecutionRequirementCode + cac:RequiredFinancialGuarantee/cbc:Description + cac:RequiredFinancialGuarantee/cbc:GuaranteeTypeCode[@listName='tender-guarantee-required'] + cac:TendererQualificationRequest[not(cac:SpecificTendererRequirement)]/cbc:CompanyLegalForm + cac:TendererQualificationRequest[not(cac:SpecificTendererRequirement)]/cbc:CompanyLegalFormCode + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='ecatalog-submission']/cbc:ExecutionRequirementCode + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='nda']/cbc:ExecutionRequirementCode + cac:Language/cbc:ID + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='conditions']/cbc:ExecutionRequirementCode + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='customer-service']/cbc:ExecutionRequirementCode + cac:TenderRecipientParty/cac:PartyIdentification/cbc:ID + cac:RequestedTenderTotal + cac:SubordinateAwardingCriterion/cbc:AwardingCriterionTypeCode[@listName='award-criterion-type'] + efac:FieldsPrivacy + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:FieldsPrivacy + efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-fixed']/efbc:ParameterNumeric + efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-threshold']/efbc:ParameterNumeric + efac:AwardCriterionParameter[efbc:ParameterCode/@listName='number-weight']/efbc:ParameterNumeric + efac:FieldsPrivacy + cac:TenderingTerms/cac:AwardingTerms + cac:TenderingProcess/cac:FrameworkAgreement + cac:RequestedTenderTotal/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efbc:FrameworkMaximumAmount + cac:RequestedTenderTotal + efac:Change + efac:ChangeReason + efac:ChangedSection + cac:ProcessJustification + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension + efac:Funding/efbc:FinancingIdentifier + efac:TenderSubcontractingRequirements/efbc:TenderSubcontractingRequirementsCode + efac:Funding/cbc:FundingProgramCode + efac:SelectionCriteria/cbc:CriterionTypeCode[@listName='selection-criterion'] + efac:DecisionReason/efac:FieldsPrivacy + efac:FieldsPrivacy + efac:NoticeResult + efac:GroupFramework + efac:NoticePurpose + cac:ContractExtension + cac:Renewal/cac:Period/cbc:Description + efac:Organization + efac:TouchPoint/cac:PartyIdentification/cbc:ID + efac:UltimateBeneficialOwner/cbc:ID + efac:Organizations + efac:UltimateBeneficialOwner/cbc:ID + efac:ContractTerm + efac:AnswerReceptionPeriod + cac:ProcurementProjectLot[cbc:ID/@schemeName='Part'] + cac:EmploymentLegislationDocumentReference + cac:EnvironmentalLegislationDocumentReference + cac:FiscalLegislationDocumentReference + cac:Address/cbc:CountrySubentityCode + cac:Address/cbc:StreetName + cac:Address/cbc:AdditionalStreetName + cac:Address/cac:AddressLine/cbc:Line + cac:Address/cbc:PostalZone + cac:Address/cbc:CityName + cac:Address/cac:Country/cbc:IdentificationCode + cac:Address/cbc:Region + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:OfficialLanguages/cac:Language/cbc:ID + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NonOfficialLanguages/cac:Language/cbc:ID + cac:ProcurementProject + cac:MainCommodityClassification/cbc:ItemClassificationCode + cac:AdditionalCommodityClassification/cbc:ItemClassificationCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='contract-nature']/cbc:ProcurementTypeCode + cac:SpecificTendererRequirement[cbc:TendererRequirementTypeCode/@listName='reserved-procurement']/cbc:TendererRequirementTypeCode + cac:AppealTerms + cac:NoticeDocumentReference/cbc:ReferencedDocumentInternalAddress + cac:AdditionalInformationRequestPeriod/cbc:EndDate + cac:AdditionalInformationRequestPeriod/cbc:EndTime + cac:ContractingSystem[cbc:ContractingSystemTypeCode/@listName='framework-agreement']/cbc:ContractingSystemTypeCode + cac:ContractingSystem[cbc:ContractingSystemTypeCode/@listName='dps-usage']/cbc:ContractingSystemTypeCode + cac:TenderingTerms + cac:ContractExecutionRequirement[cbc:ExecutionRequirementCode/@listName='reserved-execution']/cbc:ExecutionRequirementCode + cac:EconomicOperatorShortList + cac:PreSelectedParty/cac:PartyName/cbc:Name + cac:PaymentTerms + cac:PostAwardProcess + cac:Prize + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:FieldsPrivacy + cac:RealizedLocation + cac:ProcurementProject + cac:MainCommodityClassification/cbc:ItemClassificationCode + cac:AdditionalCommodityClassification/cbc:ItemClassificationCode + cac:RequestedTenderTotal/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efbc:FrameworkMaximumAmount + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='contract-nature']/cbc:ProcurementTypeCode + cac:ProcurementAdditionalType[cbc:ProcurementTypeCode/@listName='transport-service']/cbc:ProcurementTypeCode + cac:TenderingProcess + cac:NoticeDocumentReference/cbc:ID + cac:TenderingTerms + cac:ProcurementLegislationDocumentReference[not(cbc:ID/text()=('CrossBorderLaw','LocalLegalBasis'))]/cbc:ID + cac:ProcurementLegislationDocumentReference[cbc:ID/text()='LocalLegalBasis']/cbc:ID + cac:ProcurementLegislationDocumentReference[cbc:ID/text()='CrossBorderLaw']/cbc:ID + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:FieldsPrivacy + cac:RequestedTenderTotal + cac:OpenTenderEvent + cac:OccurenceLocation/cbc:Description + efac:ReceivedSubmissionsStatistics + efac:AppealsInformation + efac:AppealRequestsStatistics + efac:AppealedItem/cbc:ID + efac:AppealDecision/efbc:DecisionTypeCode + efac:AppealIrregularity/efbc:IrregularityTypeCode + efac:AppealRemedy/efbc:RemedyTypeCode + efac:AppealProcessingParty/efbc:AppealProcessingPartyTypeCode + efac:AppealingParty/efbc:AppealingPartyTypeCode + efac:AppealProcessingParty/efbc:AppealProcessingPartyTypeDescription + efac:AppealProcessingParty/cac:Party/cac:PartyIdentification/cbc:ID + efac:AppealingParty/cac:Party/cac:PartyIdentification/cbc:ID + ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension + efac:Publication/efbc:NoticePublicationID[@schemeName='ojs-notice-id'] + efac:Publication/efbc:GazetteID[@schemeName='ojs-id'] + efac:Publication/efbc:PublicationDate + cac:BusinessCapability/cbc:CapabilityTypeCode + cac:ContractingParty/cac:Party/cac:PartyIdentification/cbc:ID + cac:EconomicOperatorShortList + efac:CriterionParameter + cac:SecurityClearanceTerm + efac:SelectionCriteria + efac:CriterionParameter[efbc:ParameterCode/@listName='number-threshold']/efbc:ParameterNumeric + efac:CriterionParameter[efbc:ParameterCode/@listName='number-weight']/efbc:ParameterNumeric + cac:SenderParty/cac:Contact + efac:SettledContract + efac:LotTender/cbc:ID + efac:Funding/efbc:FinancingIdentifier + efac:Funding/cbc:FundingProgramCode + cac:SignatoryParty/cac:PartyIdentification/cbc:ID + efac:StrategicProcurement + efac:StrategicProcurement + efac:MainContractor/cbc:ID + efac:SubcontractingTerm + cac:AllowedSubcontractTerms + cac:TendererQualificationRequest + efac:Tenderer/cbc:ID + efac:SubContractor/cbc:ID + cac:PostalAddress/cbc:Department + cac:Contact/cbc:Name + cac:Contact/cbc:Telephone + cac:Contact/cbc:ElectronicMail + cac:PostalAddress/cbc:CountrySubentityCode + cac:PostalAddress/cbc:StreetName + cac:PostalAddress/cbc:AdditionalStreetName + cac:PostalAddress/cac:AddressLine/cbc:Line + cac:PostalAddress/cbc:PostalZone + cac:PostalAddress/cbc:CityName + cac:PostalAddress/cac:Country/cbc:IdentificationCode + cac:Contact/cbc:Telefax + cac:Contact/cbc:Telephone + cac:Contact/cbc:ElectronicMail + cac:ResidenceAddress/cbc:CountrySubentityCode + cac:ResidenceAddress/cbc:StreetName + cac:ResidenceAddress/cbc:AdditionalStreetName + cac:ResidenceAddress/cac:AddressLine/cbc:Line + cac:ResidenceAddress/cbc:PostalZone + cac:ResidenceAddress/cbc:CityName + cac:ResidenceAddress/cac:Country/cbc:IdentificationCode + efac:Nationality/cbc:NationalityID + cac:Contact/cbc:Telefax + efac:FieldsPrivacy + + \ No newline at end of file diff --git a/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/static/validation-stage-1a.sch b/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/static/validation-stage-1a.sch new file mode 100644 index 0000000..9ab9877 --- /dev/null +++ b/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/static/validation-stage-1a.sch @@ -0,0 +1,21 @@ + + + + + rule|text|P-0001 + + + rule|text|P-0002 + + + + + rule|text|P-0004 + + + + + rule|text|P-0005 + + + diff --git a/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/static/validation-stage-1b-1.sch b/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/static/validation-stage-1b-1.sch new file mode 100644 index 0000000..e51be47 --- /dev/null +++ b/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/static/validation-stage-1b-1.sch @@ -0,0 +1,40 @@ + + + + + rule|text|ND-BusinessParty-1 + rule|text|ND-ContractingParty-1 + rule|text|ND-GazetteReference-1 + rule|text|ND-OperationType-1 + rule|text|ND-Part-1 + rule|text|ND-ProcedureProcurementScope-1 + rule|text|ND-ProcedureTenderingProcess-1 + rule|text|ND-RootExtension-1 + rule|text|ND-SenderContact-1 + + + rule|text|ND-Buyer-1 + + + rule|text|ND-ProcedureValueEstimate-1 + + + rule|text|ND-LotDistribution-1 + rule|text|ND-TendererQualificationRequest-1 + + + rule|text|ND-CrossBorderLawUnpublish-1 + + + rule|text|ND-ContractModification-1 + rule|text|ND-NoticeResult-1 + rule|text|ND-Organizations-1 + rule|text|ND-ReviewRequests-1 + + + rule|text|ND-Organization-1 + + + rule|text|ND-Company-1 + + diff --git a/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/static/validation-stage-1b-16.sch b/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/static/validation-stage-1b-16.sch new file mode 100644 index 0000000..67d8951 --- /dev/null +++ b/src/test/resources/eforms-sdk-tests/tedefo-2929/valid/schematrons/static/validation-stage-1b-16.sch @@ -0,0 +1,85 @@ + + + + + rule|text|ND-BusinessParty-16 + rule|text|ND-ContractingParty-16 + rule|text|ND-GazetteReference-16 + rule|text|ND-OperationType-16 + rule|text|ND-Part-16 + rule|text|ND-ProcedureProcurementScope-16 + rule|text|ND-ProcedureTenderingProcess-16 + rule|text|ND-ProcedureTerms-16 + rule|text|ND-RootExtension-16 + rule|text|ND-SenderContact-16 + + + rule|text|ND-Buyer-16 + + + rule|text|ND-LotProcurementScope-16 + rule|text|ND-LotTenderingProcess-16 + rule|text|ND-LotTenderingTerms-16 + + + rule|text|ND-AuctionTerms-16 + + + rule|text|ND-InterestExpressionReceptionPeriod-16 + rule|text|ND-PMCAnswersDeadline-16 + + + rule|text|ND-LotProcurementDocument-16 + rule|text|ND-LotReservedParticipation-16 + rule|text|ND-LotReviewTerms-16 + rule|text|ND-NonUBLTenderingTerms-16 + rule|text|ND-Participants-16 + rule|text|ND-PostAwardProcess-16 + rule|text|ND-SubcontractingObligation-16 + + + rule|text|ND-LotAwardCriterionNumberComplicatedUnpublish-16 + + + rule|text|ND-LotAwardCriterionTypeUnpublish-16 + + + rule|text|ND-LotAwardCriterionFixNumberUnpublish-16 + + + rule|text|ND-LotsGroupAwardCriterionNumberComplicatedUnpublish-16 + + + rule|text|ND-LotsGroupAwardCriterionTypeUnpublish-16 + + + rule|text|ND-LotsGroupAwardCriterionFixNumberUnpublish-16 + + + rule|text|ND-ProcedureTypeUnpublish-16 + + + rule|text|ND-ProcedureAcceleratedUnpublish-16 + + + rule|text|ND-TendererQualificationRequest-16 + + + rule|text|ND-CrossBorderLawUnpublish-16 + + + rule|text|ND-ExclusionGrounds-16 + + + rule|text|ND-ContractModification-16 + rule|text|ND-NoticeResult-16 + rule|text|ND-Organizations-16 + rule|text|ND-ReviewRequests-16 + + + rule|text|ND-Organization-16 + + + rule|text|ND-Company-16 + + diff --git a/src/test/resources/eu/europa/ted/eforms/sdk/analysis/cucumber/tedefo-2929.feature b/src/test/resources/eu/europa/ted/eforms/sdk/analysis/cucumber/tedefo-2929.feature new file mode 100644 index 0000000..f964326 --- /dev/null +++ b/src/test/resources/eu/europa/ted/eforms/sdk/analysis/cucumber/tedefo-2929.feature @@ -0,0 +1,14 @@ +@tedefo-2929 +Feature: Schematron - Check schematron files are well-formed + TEDEFO-2929: Check Schematron files against the schema + Test files under "src/test/resources/eforms-sdk-tests/tedefo-2929" + + Scenario: Schematron files are well-formed + Given A "tedefo-2929" folder with "valid" files + When I execute schematron validation + Then I should get 0 schematron validation errors + + Scenario: Some schematron files are not well-formed + Given A "tedefo-2929" folder with "invalid" files + When I execute schematron validation + Then I should get 4 schematron validation errors