Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a bug in SVRL generation? #406

Open
JoergWaltherOdette opened this issue Nov 18, 2024 · 3 comments
Open

Is there a bug in SVRL generation? #406

JoergWaltherOdette opened this issue Nov 18, 2024 · 3 comments

Comments

@JoergWaltherOdette
Copy link

The ISO Schema for svrl specifies:
<xs:element name="active-pattern">
xs:complexType
<xs:attribute name="id" type="xs:ID"/>
<xs:attribute name="documents"/>
<xs:attribute name="name"/>
<xs:attribute name="role" type="xs:NMTOKEN"/>
</xs:complexType>

sources:
https://github.com/esacinc/sdcct/blob/master/sdcct-core/src/main/resources/META-INF/sdcct/schema/schematron/svrl.xsd
https://github.com/Schematron/schema/blob/main/svrl.rnc

The xml generated by the schematron artefacts produce:

<svrl:active-pattern document="file:///C:/examples/CII_example(with-errors).xml"
id="EN16931-CII-Model"
name="EN16931-CII-Model"/>

i.e. documents versus document

What is the correct version?

@phax
Copy link
Collaborator

phax commented Nov 18, 2024

It depends on the ISO Schematron version you referring to.
Details follow later....

@phax
Copy link
Collaborator

phax commented Nov 18, 2024

So, here we go:

  • ISO/IEC 19757-3:2006(E)
    Did not define this attribute at all:
    grafik

  • ISO/IEC 19757-3:2016(E)
    Did define it as "documents":
    grafik

  • ISO Schematron XSLT:

2009-02-19
  * RJ add experimental non-standard attribute active-pattern/@document which says which
  document is being validated from that point to the next similar. This is to cope with the
  experimental multi-document validation in the XSLT2 skeleton.

As the latest version was published in 2010, they never updated it.
See https://github.com/Schematron/schematron/blob/master/trunk/schematron/code/iso_svrl_for_xslt2.xsl#L551 for the code of the last version

  • And finally SchXslt does it according to Schematron 2016:
    242282027-3e6405a8-0b54-4f85-a898-43ba570c4edf

So the question is: remain on the "de facto standard" Schematron XSLT and use document or built something that is correct in regards to the latest ISO standard and use documents? In my Java Schematron implementation ph-schematron I decided to stick with document until further notice (see e.g. phax/ph-schematron#149) but it might be time to change this. My compromise will be, to emit document and documents together :)

@JoergWaltherOdette
Copy link
Author

JoergWaltherOdette commented Nov 18, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants