Closed c-alpha closed 1 week ago
Hi,
what do you mean with "using"? Are you validating something, which input? In the master or in 2.11?
kind regards Jochen
Thanks for the swift response!
what do you mean with "using"? Are you validating something, which input?
I downloaded the contents of the ZF_220
directory from the validator/src/main/resources/schematron
directory, and configured a Schematron validation scenario for each, the EN 16931
and the EXTENDED
ZF profile in
In my XML editor app, when validating an invoice under the EN 16931
validation scenario, everything works as expected. Not allowed values from code lists are flagged as "value not allowed", profiled out elements are marked as "not used in this context", etc.
When validating any input file in the XML editor app under the EXTENDED
validation scenario, the error message referring to the FACTUR-X_EXTENDED.sch
file as shown in my previous message appears.
In the master or in 2.11?
Master branch.
Internally we're using ph-schematron in a profile (generateXSLTFromSchematron) to create XSLTs from which we validate.
replace
<schema xmlns="http://purl.oclc.org/dsdl/schematron"
schemaVersion="iso">
<title>Schema for FACTUR-X; 1.0; EN16931-CONFORMANT-EXTENDED</title>
<ns uri="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" prefix="rsm"/>
<ns uri="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" prefix="qdt"/>
<ns uri="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" prefix="ram"/>
<ns uri="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" prefix="udt"/>
with
<schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<ns prefix="rsm" uri="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" />
<ns prefix="ccts" uri="urn:un:unece:uncefact:documentation:standard:CoreComponentsTechnicalSpecification:2" />
<ns prefix="udt" uri="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" />
<ns prefix="qdt" uri="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" />
<ns prefix="ram" uri="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" />
<ns prefix="xs" uri="http://www.w3.org/2001/XMLSchema" />
good luck with your xml editor.
Internally we're using ph-schematron in a profile (generateXSLTFromSchematron) to create XSLTs from which we validate.
- Why don't you refer to the original sources from the ZUGFeRD Infopaket https://www.ferd-net.de/ZUGFeRD-Download ?
I do, and the files are identical to the corresponding ones here. So I mistakenly assumed there would be some kind of link. But as it seems you are simply copying them here as external, imported stuff. Apologies for the confusion!
- accordingly, please refer to the FeRD for inquiries and issues with the ZUGFeRD Schematron files
Thanks for the pointer; will do.
- Please do note that they do have an open issue (their issue no. 117) which reads "make XSLTs oxygen compatible" which (is on the generated XSLTs and) reads as a workaround to add querybinding=xslt2
Is that issue 117 - by any chance - publicly visible anywhere?
replace
<schema xmlns="http://purl.oclc.org/dsdl/schematron" schemaVersion="iso"> [...]
with
<schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2"> [...]
good luck with your xml editor.
Thanks for the good luck wishes! it turns out that adding @queryBinding="xslt2"
is all that it takes. With that, it's workign as expected. Nice fix! 👍
When using
validator/src/main/resources/schematron/ZF_221/FACTUR-X_EXTENDED.sch
, I get the following error message for line: 27, column: 923 of the Schematron file:Same for the corresponding ZF_220 Schematron file, BTW. Haven't tried any other Schematron files.
Happens with <oXygen/> XML Developer 26.1, build 2024042206.