From 4e3976d7edbb0b64ca9b2e9655ce2ebdbd57b2e7 Mon Sep 17 00:00:00 2001 From: Stanislav Pankevich Date: Sat, 27 Apr 2024 16:57:36 +0200 Subject: [PATCH] Update ReqIF schemas to the recently updated xmlschema See https://github.com/sissaschool/xmlschema/issues/401 --- .python-version | 2 +- .../spec/ReqIF/20110402/driver.xsd | 22 +++++++++---------- .../SCHEMA/xhtml-attribs-1.xsd | 2 +- .../SCHEMA/xhtml-blkphras-1.xsd | 2 +- .../SCHEMA/xhtml-blkpres-1.xsd | 0 .../SCHEMA/xhtml-blkstruct-1.xsd | 0 .../SCHEMA/xhtml-datatypes-1.xsd | 0 .../SCHEMA/xhtml-edit-1.xsd | 0 .../SCHEMA/xhtml-framework-1.xsd | 0 .../SCHEMA/xhtml-hypertext-1.xsd | 0 .../SCHEMA/xhtml-inlphras-1.xsd | 0 .../SCHEMA/xhtml-inlpres-1.xsd | 0 .../SCHEMA/xhtml-inlstruct-1.xsd | 0 .../SCHEMA/xhtml-inlstyle-1.xsd | 0 .../SCHEMA/xhtml-list-1.xsd | 0 .../SCHEMA/xhtml-object-1.xsd | 0 .../SCHEMA/xhtml-param-1.xsd | 0 .../SCHEMA/xhtml-pres-1.xsd | 0 .../SCHEMA/xhtml-table-1.xsd | 0 .../SCHEMA/xhtml-text-1.xsd | 0 reqif/reqif_schema/reqif.xsd | 4 ++-- tasks.py | 5 +++++ .../01_incorrect_reqif_version/test.itest | 3 --- .../02_invalid_is_editable_tag/test.itest | 3 --- .../03_invalid_table_internal/test.itest | 3 --- 25 files changed, 21 insertions(+), 25 deletions(-) rename reqif/reqif_schema/{ => http}/www.omg.org/spec/ReqIF/20110402/driver.xsd (86%) rename reqif/reqif_schema/{ => http}/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-attribs-1.xsd (98%) rename reqif/reqif_schema/{ => http}/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-blkphras-1.xsd (99%) rename reqif/reqif_schema/{ => http}/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-blkpres-1.xsd (100%) rename reqif/reqif_schema/{ => http}/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-blkstruct-1.xsd (100%) rename reqif/reqif_schema/{ => http}/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-datatypes-1.xsd (100%) rename reqif/reqif_schema/{ => http}/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-edit-1.xsd (100%) rename reqif/reqif_schema/{ => http}/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-framework-1.xsd (100%) rename reqif/reqif_schema/{ => http}/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-hypertext-1.xsd (100%) rename reqif/reqif_schema/{ => http}/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-inlphras-1.xsd (100%) rename reqif/reqif_schema/{ => http}/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-inlpres-1.xsd (100%) rename reqif/reqif_schema/{ => http}/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-inlstruct-1.xsd (100%) rename reqif/reqif_schema/{ => http}/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-inlstyle-1.xsd (100%) rename reqif/reqif_schema/{ => http}/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-list-1.xsd (100%) rename reqif/reqif_schema/{ => http}/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-object-1.xsd (100%) rename reqif/reqif_schema/{ => http}/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-param-1.xsd (100%) rename reqif/reqif_schema/{ => http}/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-pres-1.xsd (100%) rename reqif/reqif_schema/{ => http}/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-table-1.xsd (100%) rename reqif/reqif_schema/{ => http}/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-text-1.xsd (100%) diff --git a/.python-version b/.python-version index e43f3bc..931669a 100644 --- a/.python-version +++ b/.python-version @@ -1,2 +1,2 @@ -3.7.15 +3.7 diff --git a/reqif/reqif_schema/www.omg.org/spec/ReqIF/20110402/driver.xsd b/reqif/reqif_schema/http/www.omg.org/spec/ReqIF/20110402/driver.xsd similarity index 86% rename from reqif/reqif_schema/www.omg.org/spec/ReqIF/20110402/driver.xsd rename to reqif/reqif_schema/http/www.omg.org/spec/ReqIF/20110402/driver.xsd index 43854bb..7dd8415 100644 --- a/reqif/reqif_schema/www.omg.org/spec/ReqIF/20110402/driver.xsd +++ b/reqif/reqif_schema/http/www.omg.org/spec/ReqIF/20110402/driver.xsd @@ -6,20 +6,20 @@ xmlns="http://www.w3.org/1999/xhtml" elementFormDefault="qualified" > - + + schemaLocation="../../../../www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-datatypes-1.xsd" /> - - - - - - - - - + + + + + + + + + diff --git a/reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-attribs-1.xsd b/reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-attribs-1.xsd similarity index 98% rename from reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-attribs-1.xsd rename to reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-attribs-1.xsd index aef2f92..e2f1382 100644 --- a/reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-attribs-1.xsd +++ b/reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-attribs-1.xsd @@ -16,7 +16,7 @@ + schemaLocation=""> This import brings in the XML namespace attributes diff --git a/reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-blkphras-1.xsd b/reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-blkphras-1.xsd similarity index 99% rename from reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-blkphras-1.xsd rename to reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-blkphras-1.xsd index 00cd01f..309e281 100644 --- a/reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-blkphras-1.xsd +++ b/reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-blkphras-1.xsd @@ -27,7 +27,7 @@ + schemaLocation=""> This import brings in the XML namespace attributes diff --git a/reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-blkpres-1.xsd b/reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-blkpres-1.xsd similarity index 100% rename from reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-blkpres-1.xsd rename to reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-blkpres-1.xsd diff --git a/reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-blkstruct-1.xsd b/reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-blkstruct-1.xsd similarity index 100% rename from reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-blkstruct-1.xsd rename to reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-blkstruct-1.xsd diff --git a/reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-datatypes-1.xsd b/reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-datatypes-1.xsd similarity index 100% rename from reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-datatypes-1.xsd rename to reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-datatypes-1.xsd diff --git a/reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-edit-1.xsd b/reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-edit-1.xsd similarity index 100% rename from reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-edit-1.xsd rename to reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-edit-1.xsd diff --git a/reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-framework-1.xsd b/reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-framework-1.xsd similarity index 100% rename from reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-framework-1.xsd rename to reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-framework-1.xsd diff --git a/reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-hypertext-1.xsd b/reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-hypertext-1.xsd similarity index 100% rename from reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-hypertext-1.xsd rename to reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-hypertext-1.xsd diff --git a/reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-inlphras-1.xsd b/reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-inlphras-1.xsd similarity index 100% rename from reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-inlphras-1.xsd rename to reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-inlphras-1.xsd diff --git a/reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-inlpres-1.xsd b/reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-inlpres-1.xsd similarity index 100% rename from reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-inlpres-1.xsd rename to reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-inlpres-1.xsd diff --git a/reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-inlstruct-1.xsd b/reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-inlstruct-1.xsd similarity index 100% rename from reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-inlstruct-1.xsd rename to reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-inlstruct-1.xsd diff --git a/reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-inlstyle-1.xsd b/reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-inlstyle-1.xsd similarity index 100% rename from reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-inlstyle-1.xsd rename to reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-inlstyle-1.xsd diff --git a/reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-list-1.xsd b/reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-list-1.xsd similarity index 100% rename from reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-list-1.xsd rename to reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-list-1.xsd diff --git a/reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-object-1.xsd b/reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-object-1.xsd similarity index 100% rename from reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-object-1.xsd rename to reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-object-1.xsd diff --git a/reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-param-1.xsd b/reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-param-1.xsd similarity index 100% rename from reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-param-1.xsd rename to reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-param-1.xsd diff --git a/reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-pres-1.xsd b/reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-pres-1.xsd similarity index 100% rename from reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-pres-1.xsd rename to reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-pres-1.xsd diff --git a/reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-table-1.xsd b/reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-table-1.xsd similarity index 100% rename from reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-table-1.xsd rename to reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-table-1.xsd diff --git a/reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-text-1.xsd b/reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-text-1.xsd similarity index 100% rename from reqif/reqif_schema/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-text-1.xsd rename to reqif/reqif_schema/http/www.w3.org/TR/xhtml-modularization/SCHEMA/xhtml-text-1.xsd diff --git a/reqif/reqif_schema/reqif.xsd b/reqif/reqif_schema/reqif.xsd index a0a5cf1..bfd2203 100644 --- a/reqif/reqif_schema/reqif.xsd +++ b/reqif/reqif_schema/reqif.xsd @@ -3,8 +3,8 @@ xmlns="http://www.w3.org/1999/xhtml" xmlns:REQIF="http://www.omg.org/spec/ReqIF/20110401/reqif.xsd" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.omg.org/spec/ReqIF/20110401/reqif.xsd"> - - + + diff --git a/tasks.py b/tasks.py index 54be47d..dcc8a79 100644 --- a/tasks.py +++ b/tasks.py @@ -1,9 +1,14 @@ +import inspect import os import re import invoke from invoke import task +# FIXME +if not hasattr(inspect, "getargspec"): + inspect.getargspec = inspect.getfullargspec + def one_line_command(string): return re.sub("\\s+", " ", string).strip() diff --git a/tests/integration/commands/validate/_xsd_schema_validation/01_incorrect_reqif_version/test.itest b/tests/integration/commands/validate/_xsd_schema_validation/01_incorrect_reqif_version/test.itest index 7e74598..3269c3f 100644 --- a/tests/integration/commands/validate/_xsd_schema_validation/01_incorrect_reqif_version/test.itest +++ b/tests/integration/commands/validate/_xsd_schema_validation/01_incorrect_reqif_version/test.itest @@ -1,5 +1,2 @@ -# FIXME -UNSUPPORTED: true - RUN: %expect_exit 1 %reqif validate --use-reqif-schema %S/sample.reqif | filecheck %s --dump-input=fail CHECK: Reason: must have the fixed value '1.0' diff --git a/tests/integration/commands/validate/_xsd_schema_validation/02_invalid_is_editable_tag/test.itest b/tests/integration/commands/validate/_xsd_schema_validation/02_invalid_is_editable_tag/test.itest index ac9dd9b..e45aedb 100644 --- a/tests/integration/commands/validate/_xsd_schema_validation/02_invalid_is_editable_tag/test.itest +++ b/tests/integration/commands/validate/_xsd_schema_validation/02_invalid_is_editable_tag/test.itest @@ -1,5 +1,2 @@ -# FIXME -UNSUPPORTED: true - RUN: %expect_exit 1 %reqif validate --use-reqif-schema %S/sample.reqif | filecheck %s --dump-input=fail CHECK: Reason: Unexpected child with tag 'REQIF:IS-EDITABLE' at position 2. diff --git a/tests/integration/commands/validate/_xsd_schema_validation/03_invalid_table_internal/test.itest b/tests/integration/commands/validate/_xsd_schema_validation/03_invalid_table_internal/test.itest index d7e9fe6..fbbae8c 100644 --- a/tests/integration/commands/validate/_xsd_schema_validation/03_invalid_table_internal/test.itest +++ b/tests/integration/commands/validate/_xsd_schema_validation/03_invalid_table_internal/test.itest @@ -1,5 +1,2 @@ -# FIXME -UNSUPPORTED: true - RUN: %expect_exit 1 %reqif validate --use-reqif-schema %S/sample.reqif | filecheck %s --dump-input=fail CHECK: Reason: Unexpected child with tag 'REQIF:IS-TABLE-INTERNAL' at position 1. Tag 'REQIF:OBJECT' expected.