Skip to content

Commit

Permalink
Updated test files
Browse files Browse the repository at this point in the history
  • Loading branch information
phax committed Oct 8, 2024
1 parent f7b51ac commit b9973d3
Show file tree
Hide file tree
Showing 16 changed files with 3,508 additions and 293 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Licensed under European Union Public Licence (EUPL) version 1.2.

-->
<!--Schematron version 1.3.12 - Last update: 2024-04-06--><xsl:stylesheet xmlns:svrl="http://purl.oclc.org/dsdl/svrl" xmlns:ccts="urn:un:unece:uncefact:documentation:standard:CoreComponentsTechnicalSpecification:2" xmlns:iso="http://purl.oclc.org/dsdl/schematron" xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" xmlns:saxon="http://saxon.sf.net/" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<!--Schematron version 1.3.13 - Last update: 2024-10-08--><xsl:stylesheet xmlns:svrl="http://purl.oclc.org/dsdl/svrl" xmlns:ccts="urn:un:unece:uncefact:documentation:standard:CoreComponentsTechnicalSpecification:2" xmlns:iso="http://purl.oclc.org/dsdl/schematron" xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" xmlns:saxon="http://saxon.sf.net/" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<!--Implementers: please note that overriding process-prolog or process-root is
the preferred method for meta-stylesheets to use where possible. -->

Expand Down Expand Up @@ -681,7 +681,7 @@

<!--ASSERT -->
<xsl:choose>
<xsl:when test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true()])and not (ram:ChargeTotalAmount)) or ram:ChargeTotalAmount = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true()]/ram:ActualAmount)* 10 * 10 ) div 100) " />
<xsl:when test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true()])and not (ram:ChargeTotalAmount)) or ram:ChargeTotalAmount = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true()]/ram:ActualAmount)* 10 * 10 ) div 100)" />
<xsl:otherwise>
<svrl:failed-assert test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true()])and not (ram:ChargeTotalAmount)) or ram:ChargeTotalAmount = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true()]/ram:ActualAmount)* 10 * 10 ) div 100)">
<xsl:attribute name="id">BR-CO-12</xsl:attribute>
Expand Down Expand Up @@ -1929,7 +1929,7 @@

<!--ASSERT -->
<xsl:choose>
<xsl:when test=". = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:CalculatedAmount)*10*10)div 100) " />
<xsl:when test=". = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:CalculatedAmount)*10*10)div 100)" />
<xsl:otherwise>
<svrl:failed-assert test=". = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:CalculatedAmount)*10*10)div 100)">
<xsl:attribute name="id">BR-CO-14</xsl:attribute>
Expand Down Expand Up @@ -7001,8 +7001,8 @@
</xsl:template>

<!--RULE -->
<xsl:template match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement " mode="M11" priority="1017">
<svrl:fired-rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement " />
<xsl:template match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement" mode="M11" priority="1017">
<svrl:fired-rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement" />

<!--ASSERT -->
<xsl:choose>
Expand Down Expand Up @@ -7906,9 +7906,9 @@

<!--ASSERT -->
<xsl:choose>
<xsl:when test="not(ram:BuyerTaxRepresentativeTradeParty)" />
<xsl:when test="not(ram:SellerTaxRepresentativeTradeParty/ram:ID)" />
<xsl:otherwise>
<svrl:failed-assert test="not(ram:BuyerTaxRepresentativeTradeParty)">
<svrl:failed-assert test="not(ram:SellerTaxRepresentativeTradeParty/ram:ID)">
<xsl:attribute name="id">CII-SR-282</xsl:attribute>
<xsl:attribute name="flag">warning</xsl:attribute>
<xsl:attribute name="location">
Expand Down Expand Up @@ -10621,7 +10621,7 @@
<xsl:when test="not(@schemeName)" />
<xsl:otherwise>
<svrl:failed-assert test="not(@schemeName)">
<xsl:attribute name="id">CII-DT-001</xsl:attribute>
<xsl:attribute name="id">CII-DT-0010</xsl:attribute>
<xsl:attribute name="flag">fatal</xsl:attribute>
<xsl:attribute name="location">
<xsl:apply-templates mode="schematron-select-full-path" select="." />
Expand All @@ -10636,7 +10636,7 @@
<xsl:when test="not(@schemeAgencyName)" />
<xsl:otherwise>
<svrl:failed-assert test="not(@schemeAgencyName)">
<xsl:attribute name="id">CII-DT-002</xsl:attribute>
<xsl:attribute name="id">CII-DT-0020</xsl:attribute>
<xsl:attribute name="flag">fatal</xsl:attribute>
<xsl:attribute name="location">
<xsl:apply-templates mode="schematron-select-full-path" select="." />
Expand All @@ -10651,7 +10651,7 @@
<xsl:when test="not(@schemeDataURI)" />
<xsl:otherwise>
<svrl:failed-assert test="not(@schemeDataURI)">
<xsl:attribute name="id">CII-DT-003</xsl:attribute>
<xsl:attribute name="id">CII-DT-0030</xsl:attribute>
<xsl:attribute name="flag">fatal</xsl:attribute>
<xsl:attribute name="location">
<xsl:apply-templates mode="schematron-select-full-path" select="." />
Expand All @@ -10666,7 +10666,7 @@
<xsl:when test="not(@schemeURI)" />
<xsl:otherwise>
<svrl:failed-assert test="not(@schemeURI)">
<xsl:attribute name="id">CII-DT-004</xsl:attribute>
<xsl:attribute name="id">CII-DT-0040</xsl:attribute>
<xsl:attribute name="flag">fatal</xsl:attribute>
<xsl:attribute name="location">
<xsl:apply-templates mode="schematron-select-full-path" select="." />
Expand Down Expand Up @@ -10837,7 +10837,7 @@

<!--ASSERT -->
<xsl:choose>
<xsl:when test="not(ram:URIID) or (self::ram:AdditionalReferencedDocument and ram:TypeCode='916') " />
<xsl:when test="not(ram:URIID) or (self::ram:AdditionalReferencedDocument and ram:TypeCode='916')" />
<xsl:otherwise>
<svrl:failed-assert test="not(ram:URIID) or (self::ram:AdditionalReferencedDocument and ram:TypeCode='916')">
<xsl:attribute name="id">CII-DT-015</xsl:attribute>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Licensed under European Union Public Licence (EUPL) version 1.2.

-->
<!--Schematron version 1.3.12 - Last update: 2024-04-06--><xsl:stylesheet xmlns:svrl="http://purl.oclc.org/dsdl/svrl" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:cn="urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:iso="http://purl.oclc.org/dsdl/schematron" xmlns:qdt="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDataTypes-2" xmlns:saxon="http://saxon.sf.net/" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:ubl="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:udt="urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<!--Schematron version 1.3.13 - Last update: 2024-10-08--><xsl:stylesheet xmlns:svrl="http://purl.oclc.org/dsdl/svrl" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:cn="urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:iso="http://purl.oclc.org/dsdl/schematron" xmlns:qdt="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDataTypes-2" xmlns:saxon="http://saxon.sf.net/" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:ubl="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:udt="urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<!--Implementers: please note that overriding process-prolog or process-root is
the preferred method for meta-stylesheets to use where possible. -->

Expand Down Expand Up @@ -231,8 +231,8 @@
</xsl:template>

<!--RULE -->
<xsl:template match="/ubl:Invoice/cac:LegalMonetaryTotal/cbc:PayableAmount " mode="M11" priority="1065">
<svrl:fired-rule context="/ubl:Invoice/cac:LegalMonetaryTotal/cbc:PayableAmount " />
<xsl:template match="/ubl:Invoice/cac:LegalMonetaryTotal/cbc:PayableAmount" mode="M11" priority="1065">
<svrl:fired-rule context="/ubl:Invoice/cac:LegalMonetaryTotal/cbc:PayableAmount" />

<!--ASSERT -->
<xsl:choose>
Expand Down Expand Up @@ -341,7 +341,7 @@

<!--ASSERT -->
<xsl:choose>
<xsl:when test="exists(cbc:Amount) " />
<xsl:when test="exists(cbc:Amount)" />
<xsl:otherwise>
<svrl:failed-assert test="exists(cbc:Amount)">
<xsl:attribute name="id">BR-31</xsl:attribute>
Expand Down Expand Up @@ -2196,8 +2196,8 @@
</xsl:template>

<!--RULE -->
<xsl:template match="cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode | cac:CreditNoteLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode " mode="M11" priority="1050">
<svrl:fired-rule context="cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode | cac:CreditNoteLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode " />
<xsl:template match="cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode | cac:CreditNoteLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode" mode="M11" priority="1050">
<svrl:fired-rule context="cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode | cac:CreditNoteLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode" />

<!--ASSERT -->
<xsl:choose>
Expand Down Expand Up @@ -3679,8 +3679,8 @@


<!--RULE -->
<xsl:template match="//cac:PostalAddress | //cac:Address " mode="M12" priority="1014">
<svrl:fired-rule context="//cac:PostalAddress | //cac:Address " />
<xsl:template match="//cac:PostalAddress | //cac:Address" mode="M12" priority="1014">
<svrl:fired-rule context="//cac:PostalAddress | //cac:Address" />

<!--ASSERT -->
<xsl:choose>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,21 +421,20 @@ public static ICommonsList <? extends IReadableResource> getAllMatchingTestFiles
if (aVESID.equals (EN16931Validation.VID_CII_1313))
{
final String sPrefix = sPrefix0 + "1.3.13/cii/";
return new CommonsArrayList <> (new String [] { // "20230315_original.xml",
"CII_business_example_01.xml",
return new CommonsArrayList <> (new String [] { "CII_business_example_01.xml",
"CII_business_example_02.xml",
// "CII_business_example_Z.xml",
"CII_business_example_Z.xml",
"CII_example1.xml",
// "CII_example2.xml",
"CII_example2.xml",
"CII_example3.xml",
"CII_example4.xml",
// "CII_example5.xml",
"CII_example5.xml",
"CII_example6.xml",
"CII_example7.xml",
"CII_example8.xml",
"CII_example9.xml",
"CII-BR-CO-10-RoundingIssue.xml",
"huf_example_cii.xml.xml",
"huf_example_cii.xml",
"XRechnung-O.xml" },
x -> new ClassPathResource (sPrefix + x));
}
Expand Down Expand Up @@ -849,14 +848,14 @@ public static ICommonsList <? extends IReadableResource> getAllMatchingTestFiles
if (aVESID.equals (EN16931Validation.VID_UBL_INVOICE_1313))
{
final String sPrefix = sPrefix0 + "1.3.13/ubl/";
return new CommonsArrayList <> (new String [] { // "BIS3_Invoice_negativ.XML",
// "BIS3_Invoice_positive.XML",
// "guide-example1.xml",
// "guide-example2.xml",
// "guide-example3.xml",
// "issue116.xml",
// "sample-discount-price.xml",
return new CommonsArrayList <> (new String [] { "BIS3_Invoice_negativ.XML",
"BIS3_Invoice_positive.XML",
"FT G2G_TD01 con Allegato, Bonifico e Split Payment.xml",
"guide-example1.xml",
"guide-example2.xml",
"guide-example3.xml",
"issue116.xml",
"sample-discount-price.xml",
"ubl-tc434-example1.xml",
"ubl-tc434-example2.xml",
"ubl-tc434-example3.xml",
Expand All @@ -866,8 +865,8 @@ public static ICommonsList <? extends IReadableResource> getAllMatchingTestFiles
"ubl-tc434-example7.xml",
"ubl-tc434-example8.xml",
"ubl-tc434-example9.xml",
// "ubl-tc434-example10.xml"
}, x -> new ClassPathResource (sPrefix + x));
"ubl-tc434-example10.xml" },
x -> new ClassPathResource (sPrefix + x));
}
if (aVESID.equals (EN16931Validation.VID_UBL_CREDIT_NOTE_1313))
{
Expand Down
Loading

0 comments on commit b9973d3

Please sign in to comment.