Closed costas80 closed 2 years ago
This is indeed an issue.
Okay, I crosschecked with the XSLT implementation and the following attributes may be contained:
xml:lang
xml:space
fpi
(only if allowForeignElements
is set to true
)see
(only if allowForeignElements
is set to true
)icon
(only if allowForeignElements
is set to true
)Therefore I needed to extend the svrl.xsd
as well to allow for these attributes.
Afterwards, copying the values from the diagnostic was simple.
Unfortunately the documentation on this issue is very poor in the ISO spec....
Part of the 6.2.8 release
We use
ph-schematron
(version 6.2.7) to validate XML against Schematron files which can be both already converted to XSLT or validated as "pure" Schematron (Schematron files are user-provided). When working with multilingual Schematron files (i.e. ones that define language-specific messages asdiagnostic
elements) we see that in the case of pure Schematron validation the value of the diagnostics'xml:lang
attribute is not included. In contrast, in the case of XSLT-based validation, thexml:lang
values are present as expected. This inconsistency leads us to only be able to use XSLT-based validation for multilingual Schematrons, given that we depend on the language attribute to build validation reports based on the user's locale.To illustrate with an example, consider the following multilingual Schematron:
Having validated this (either in pure mode or after pre-processing to XSLT) I get a
SchematronOutputType
that I then process with theSVRLHelper
class. From here, accessing each failure'sDiagnosticReference
instances, thelang
is only set if the Schematron was validated as XSLT:I would expect that the
lang
value is also present in the case of pure-mode validation. Could you confirm if this is indeed an issue with the current version or if I'm missing something? Thanks!