Skip to content

Commit

Permalink
Added Minimum SCH
Browse files Browse the repository at this point in the history
  • Loading branch information
phax committed Dec 5, 2024
1 parent 3ba766f commit 8852fae
Show file tree
Hide file tree
Showing 8 changed files with 2,854 additions and 2 deletions.
6 changes: 6 additions & 0 deletions phive-rules-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@
<version>${ph-cii.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.helger.cii</groupId>
<artifactId>ph-cii-d22b</artifactId>
<version>${ph-cii.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.helger.ubl</groupId>
<artifactId>ph-ubl20</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import javax.annotation.concurrent.Immutable;

import com.helger.cii.d16b.CIID16BNamespaceContext;
import com.helger.cii.d22b.CIID22BNamespaceContext;
import com.helger.commons.io.resource.IReadableResource;
import com.helger.phive.xml.schematron.ValidationExecutorSchematron;

Expand All @@ -39,4 +40,10 @@ public static ValidationExecutorSchematron createXSLT_CII_D16B (@Nonnull final I
{
return PhiveRulesHelper.createXSLT (aRes, CIID16BNamespaceContext.getInstance ());
}

@Nonnull
public static ValidationExecutorSchematron createXSLT_CII_D22B (@Nonnull final IReadableResource aRes)
{
return PhiveRulesHelper.createXSLT (aRes, CIID22BNamespaceContext.getInstance ());
}
}
34 changes: 34 additions & 0 deletions phive-rules-zugferd/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@
<groupId>com.helger.phive.rules</groupId>
<artifactId>phive-rules-api</artifactId>
</dependency>
<dependency>
<groupId>com.helger.cii</groupId>
<artifactId>ph-cii-d16b</artifactId>
<version>${ph-cii.version}</version>
</dependency>
<dependency>
<groupId>com.helger.cii</groupId>
<artifactId>ph-cii-d22b</artifactId>
<version>${ph-cii.version}</version>
</dependency>

<dependency>
<groupId>junit</groupId>
Expand All @@ -73,6 +83,11 @@
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand All @@ -91,6 +106,25 @@
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>com.helger.maven</groupId>
<artifactId>ph-schematron-maven-plugin</artifactId>
<executions>
<!--
<execution>
<id>zugferd</id>
<goals>
<goal>convert</goal>
</goals>
<configuration>
<schematronDirectory>${basedir}/src/test/resources/external/rule-source/2.3.2</schematronDirectory>
<xsltDirectory>${basedir}/src/main/resources/external/schematron/2.3.2</xsltDirectory>
<schematronPattern>*.sch</schematronPattern>
</configuration>
</execution>
-->
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.helger.phive.api.executorset.IValidationExecutorSetRegistry;
import com.helger.phive.api.executorset.ValidationExecutorSet;
import com.helger.phive.api.executorset.ValidationExecutorSetAlias;
import com.helger.phive.rules.api.PhiveRulesCIIHelper;
import com.helger.phive.rules.api.PhiveRulesHelper;
import com.helger.phive.xml.source.IValidationSourceXML;
import com.helger.phive.xml.xsd.ValidationExecutorXSD;
Expand Down Expand Up @@ -106,7 +107,9 @@ public static void initZugferd (@Nonnull final IValidationExecutorSetRegistry <I
"ZUGFeRD " + VID_ZUGFERD_2_3_2_MINIMUM.getVersionString (),
PhiveRulesHelper.createSimpleStatus (bNotDeprecated),
ValidationExecutorXSD.create (new ClassPathResource ("/external/schemas/2.3.2/minimum/Factur-X_1.07.2_MINIMUM.xsd",
_getCL ())));
_getCL ())),
PhiveRulesCIIHelper.createXSLT_CII_D22B (new ClassPathResource ("/external/schematron/2.3.2/Factur-X_1.07.2_MINIMUM.xslt",
_getCL ())));
aRegistry.registerValidationExecutorSet (aVES);
_registerFacturXAlias (aRegistry, aVES);
}
Expand Down
Loading

0 comments on commit 8852fae

Please sign in to comment.