Closed CEFSUPPORT closed 5 years ago
Hi. Can you add the attachments as well please. Thanks
Hi, I'm uploading a fragment of the "good" and the "bad" eInvoice instance and the error report.
I have created an example file with a different namespace prefix than "ram" and it works without problems. Maybe it is an error in the Midran validator? The fixed "ram" prefix is used, because it is part of the CII Schematron rules (<ns...>
).
hth
No, the name()='ram:AdditionalReferencedDocument' statement string-compares the name (including prefix). I didn't spot this using validex, just XML Spy Xpath evaluator.
But the prefix for Schematron inside the SCH:
<ns prefix="ram"
uri="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"/>
Yes, schematron/XSLT is aware of namespaces as the are declared. That's why a string comparison against a specific prefix ends up in unexpected results. And the name() function returns the element name including the prefix as a string. The rule then incorrectly assumes that the prefix always is ram:.
/Martin Forsberg
From: Philip Helger notifications@github.com Sent: Tuesday, April 10, 2018 1:24:04 PM To: CenPC434/validation Cc: Martin Forsberg; Comment Subject: Re: [CenPC434/validation] XML prefixes (#61)
But the prefix for Schematron inside the SCH:
<ns prefix="ram" uri="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"/>
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/CenPC434/validation/issues/61#issuecomment-380064816, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Ad1DbPrgobYJEmSn9Ef-heawEnexE2qCks5tnJZUgaJpZM4St4pg.
The easiest fix to wrong expressions like name()='ram:AdditionalReferencedDocument'
is to use self::ram:AdditionalReferencedDocument
The nature of expression is to check name of the current element and this can be done easily by using self:: node.
Hello, We got the following request:
Could you please check for the possible fixing?
Thanks, CEFSUPPORT