Schematron schema license

Bug #2024343 reported by Matěj Cepl
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
lxml
Fix Released
Low
scoder

Bug Description

Red Hat lawyers concluded (https://gitlab.com/fedora/legal/fedora-license-data/-/issues/154) that the license included in https://github.com/lxml/lxml/blob/master/src/lxml/isoschematron/resources/rng/iso-schematron.rng is confusing, misworded, and most likely non-Free (distribute-only-for-gratis problem).

They started to remove the schema file from their project (e.g., https://src.fedoraproject.org/rpms/python-lxml/c/9d95f5a04edc386313fa854541971b3af07bcae1?branch=rawhide).

Before doing the same for SUSE packages, I want to ask whether it wouldn’t be possible to somehow ameliorate the situation and have the schema under the correct fully free license.

Thank you

Revision history for this message
scoder (scoder) wrote :

Thanks for bringing this up. I hadn't heard about it before.

I don't think there is anything we can do about the license since we don't own or control this part of the software.

I do wonder why they removed the whole package, though, including the XSL part, when the license is only in the RNG file. Seems worth some further investigation which files are really impacted by the license unclarity.

Changed in lxml:
status: New → Triaged
Revision history for this message
Holger Joukl (jholg) wrote :

The lxml iso schematron implementation uses the RNG file unconditionally to check if the (standalone or XSD/RelaxNG-extracted) Schematron schema itself is valid: https://github.com/lxml/lxml/blob/397c0d94511f219bf7fa00ff71d2630e52fff5d2/src/lxml/isoschematron/__init__.py#L65-L67

Revision history for this message
Holger Joukl (jholg) wrote :

IIUC https://gitlab.com/fedora/legal/fedora-license-data/-/issues/154 concludes that the most likely interpretation of the (unclear/ambiguous) terms are that only *free of charge distribution* is allowed ("signifies that you can only distribute without charging money for copies").
Not a problem for lxml per se in my humble opinion, but obviously(?) for distributors - IANAL.

Unfortunately the Schematron ISO "open" standards (2006, 2016, 2020) documents aren't available free of charge any more, so no easy way to assess if a properly open source licensed from-scratch implementation of a schema-for-schematron could be feasible. Rick Jelliffe epresses his discontent on this here: https://www.schematron.com/standards/iso_schematron_2020_released.html.

https://www.schematron.com/home/open_licenses.html states that "Schematron and RELAX NG schemas for ISO Schematron provide and open and free license in their headers; the license is the same as the ISO 8879:1986 standard public entity sets for SGML with an additional clause requiring that modified files state that they are modified.". Which seems to be what was originally included in lxml at isoschematron inception time (https://github.com/lxml/lxml/commit/a9144fcdde863301564b2a4b63c47ba2681dc076#diff-7e50a93c3193a8d1a413707d120dc08b4bf39aaccb5b02fd5394bf2e3607d385) - albeit arguably even more unclear/ambiguous.

Revision history for this message
scoder (scoder) wrote :

Thanks for jumping in, Holger. That sounds like we could make it … conditional? Meaning, if the file isn't there, we skip the schema's own validation?

Revision history for this message
scoder (scoder) wrote :

I've made the schema file validation optional in https://github.com/lxml/lxml/commit/4bfab2c821961fb4c5ed8a04e329778c9b09a1df

This will become available in lxml 5.0. Distributions can now remove only the one file that they dislike and keep the ISO-Schematron support itself intact and available.

Changed in lxml:
assignee: nobody → scoder (scoder)
importance: Undecided → Low
milestone: none → 5.0
status: Triaged → Fix Committed
Revision history for this message
Holger Joukl (jholg) wrote :

Great, looks like the best that can be done for now.

I've taken the liberty to file an issue (https://github.com/Schematron/schematron-enhancement-proposals/issues/65) on the schematron-enhancements repo linked from https://www.schematron.com/, to find out if someone sees other avenues.

Revision history for this message
Miro Hrončok (churchyard) wrote :

I am working towards a backport for Fedora. Currently, the build fails with:

======================================================================
FAIL: test_schematron_invalid_schema_empty (lxml.tests.test_isoschematron.ETreeISOSchematronTestCase.test_schematron_invalid_schema_empty)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.12/unittest/case.py", line 58, in testPartExecutor
    yield
  File "/usr/lib64/python3.12/unittest/case.py", line 634, in run
    self._callTestMethod(testMethod)
  File "/usr/lib64/python3.12/unittest/case.py", line 589, in _callTestMethod
    if method() is not None:
       ^^^^^^^^
  File "/builddir/build/BUILD/lxml-4.9.2/src/lxml/tests/test_isoschematron.py", line 62, in test_schematron_invalid_schema_empty
    self.assertRaises(etree.SchematronParseError,
  File "/usr/lib64/python3.12/unittest/case.py", line 778, in assertRaises
    return context.handle('assertRaises', args, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/unittest/case.py", line 237, in handle
    with self:
  File "/usr/lib64/python3.12/unittest/case.py", line 260, in __exit__
    self._raiseFailure("{} not raised by {}".format(exc_name,
  File "/usr/lib64/python3.12/unittest/case.py", line 200, in _raiseFailure
    raise self.test_case.failureException(msg)
AssertionError: SchematronParseError not raised by Schematron

I suppose the test should be adapted as well, is that correct? I can submit a PR.

Revision history for this message
Miro Hrončok (churchyard) wrote :
scoder (scoder)
Changed in lxml:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.