From 92551d6ede6254a1b42bfd8995dc001f231325cb Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 9 Jun 2026 14:11:10 +0100 Subject: [PATCH 01/13] Correcting missing x509EncryptionDetails type --- 103120/schema/xsd/ts_103120_Encryption.xsd | 2 +- testing/xml/ts_103120_xsd.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/103120/schema/xsd/ts_103120_Encryption.xsd b/103120/schema/xsd/ts_103120_Encryption.xsd index fc8b7c8..4661388 100644 --- a/103120/schema/xsd/ts_103120_Encryption.xsd +++ b/103120/schema/xsd/ts_103120_Encryption.xsd @@ -8,7 +8,7 @@ - + diff --git a/testing/xml/ts_103120_xsd.json b/testing/xml/ts_103120_xsd.json index 8a66148..ed655ed 100644 --- a/testing/xml/ts_103120_xsd.json +++ b/testing/xml/ts_103120_xsd.json @@ -4,6 +4,7 @@ "103120/schema/xsd/ts_103120_Authorisation.xsd", "103120/schema/xsd/ts_103120_Common.xsd", "103120/schema/xsd/ts_103120_Config.xsd", + "103120/schema/xsd/ts_103120_Encryption.xsd", "103120/schema/xsd/ts_103120_Delivery.xsd", "103120/schema/xsd/ts_103120_Destination.xsd", "103120/dictionaries/ts_103120_Dictionaries.xsd", -- GitLab From 1673c2319b6e4246d1f79df482cb17c744e39e28 Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 9 Jun 2026 14:11:50 +0100 Subject: [PATCH 02/13] Removing incorrect Reference field from TDTask --- 103120/schema/xsd/ts_103120_Task.xsd | 1 - 1 file changed, 1 deletion(-) diff --git a/103120/schema/xsd/ts_103120_Task.xsd b/103120/schema/xsd/ts_103120_Task.xsd index 2374709..ebca1d5 100644 --- a/103120/schema/xsd/ts_103120_Task.xsd +++ b/103120/schema/xsd/ts_103120_Task.xsd @@ -269,7 +269,6 @@ - -- GitLab From c3318db5c0fdde147a87ab5ef23c3967b59f44ef Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 9 Jun 2026 14:13:54 +0100 Subject: [PATCH 03/13] Fixing missing TakedownDeadline type reference and broken example --- 103120/examples/xml/request_takedown.xml | 2 +- 103120/schema/xsd/ts_103120_Task.xsd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/103120/examples/xml/request_takedown.xml b/103120/examples/xml/request_takedown.xml index 8bbca75..88dbd8f 100644 --- a/103120/examples/xml/request_takedown.xml +++ b/103120/examples/xml/request_takedown.xml @@ -90,7 +90,7 @@ - 2026-02-01:12:00:00Z + 2026-02-01T12:00:00Z ETSI TDNatureOfDeadline diff --git a/103120/schema/xsd/ts_103120_Task.xsd b/103120/schema/xsd/ts_103120_Task.xsd index ebca1d5..d32d4a7 100644 --- a/103120/schema/xsd/ts_103120_Task.xsd +++ b/103120/schema/xsd/ts_103120_Task.xsd @@ -309,7 +309,7 @@ - + -- GitLab From 0b44d8e59659cb96b2b308baf3fe5709cc0f917f Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 9 Jun 2026 14:15:15 +0100 Subject: [PATCH 04/13] Updating JSON translation --- .../json/ts_103120_Delivery.schema.json | 7 ++ .../json/ts_103120_Encryption.schema.json | 78 +++++++++++++++++++ 103120/schema/json/ts_103120_Task.schema.json | 7 +- utils/ts103120_config.json | 3 + 4 files changed, 91 insertions(+), 4 deletions(-) create mode 100644 103120/schema/json/ts_103120_Encryption.schema.json diff --git a/103120/schema/json/ts_103120_Delivery.schema.json b/103120/schema/json/ts_103120_Delivery.schema.json index 1c34cd4..48ddf48 100644 --- a/103120/schema/json/ts_103120_Delivery.schema.json +++ b/103120/schema/json/ts_103120_Delivery.schema.json @@ -260,6 +260,13 @@ }, "delivery:Checksums": { "$ref": "ts_103120_Common_2016_02#/$defs/ListOfChecksumAndType" + }, + "delivery:OriginalFilename": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "delivery:ContentLength": { + "type": "integer", + "minimum": 0 } }, "required": [ diff --git a/103120/schema/json/ts_103120_Encryption.schema.json b/103120/schema/json/ts_103120_Encryption.schema.json new file mode 100644 index 0000000..ded5c04 --- /dev/null +++ b/103120/schema/json/ts_103120_Encryption.schema.json @@ -0,0 +1,78 @@ +{ + "$id": "ts_103120_Encryption_2026_01", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$defs": { + "EncryptionObject": { + "type": "object", + "properties": { + "@xsi:type": { + "type": "string", + "enum": [ + "{http://uri.etsi.org/03120/common/2026/01/Encryption}EncryptionObject" + ] + }, + "ObjectIdentifier": { + "$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier" + }, + "CountryCode": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + }, + "OwnerIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + }, + "Generation": { + "type": "integer", + "minimum": 0 + }, + "ExternalIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "AssociatedObjects": { + "$ref": "ts_103120_Core_2019_10#/$defs/AssociatedObjects" + }, + "LastChanged": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "NationalHandlingParameters": { + "$ref": "ts_103120_Core_2019_10#/$defs/NationalHandlingParameters" + }, + "encryption:EncryptionScheme": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "encryption:X509EncryptionDetails": { + "$ref": "#/$defs/X509EncryptionDetails" + } + }, + "required": [ + "@xsi:type", + "ObjectIdentifier", + "encryption:EncryptionScheme" + ], + "additionalProperties": false + }, + "X509EncryptionDetails": { + "type": "object", + "properties": { + "encryption:X509Certificates": { + "type": "array", + "items": { + "$ref": "#/$defs/X509Certificate" + } + } + }, + "required": [], + "additionalProperties": false + }, + "X509Certificate": { + "type": "object", + "properties": { + "encryption:X509CertificateDER": { + "type": "string", + "pattern": "^[A-Za-z0-9+\\/]*={0,3}$" + } + }, + "required": [], + "additionalProperties": false + } + } +} diff --git a/103120/schema/json/ts_103120_Task.schema.json b/103120/schema/json/ts_103120_Task.schema.json index c016375..7ea9a56 100644 --- a/103120/schema/json/ts_103120_Task.schema.json +++ b/103120/schema/json/ts_103120_Task.schema.json @@ -867,9 +867,6 @@ "NationalHandlingParameters": { "$ref": "ts_103120_Core_2019_10#/$defs/NationalHandlingParameters" }, - "task:Reference": { - "$ref": "ts_103280_2017_07#/$defs/LongString" - }, "task:RequesterReference": { "$ref": "ts_103280_2017_07#/$defs/LongString" }, @@ -972,7 +969,9 @@ "properties": { "task:TakedownDeadline": { "type": "array", - "items": {} + "items": { + "$ref": "#/$defs/TakedownDeadline" + } } }, "required": [], diff --git a/utils/ts103120_config.json b/utils/ts103120_config.json index 6a89326..3011ae0 100644 --- a/utils/ts103120_config.json +++ b/utils/ts103120_config.json @@ -20,6 +20,9 @@ "./103120/schema/xsd/ts_103120_Document.xsd": { "prefix": "doc" }, + "./103120/schema/xsd/ts_103120_Encryption.xsd": { + "prefix": "encryption" + }, "./103120/schema/xsd/ts_103120_Notification.xsd": { "prefix": "notification" }, -- GitLab From 3c125252f4001325389f8fdaef416bdab1c14709 Mon Sep 17 00:00:00 2001 From: vanschelts Date: Wed, 1 Jul 2026 10:52:41 +0200 Subject: [PATCH 05/13] Check for untyped elements --- testing/xml/lint_xml.py | 58 ++++++++++++++++++++++++++++++------ testing/xml/requirements.txt | 1 + 2 files changed, 50 insertions(+), 9 deletions(-) diff --git a/testing/xml/lint_xml.py b/testing/xml/lint_xml.py index 9b032a2..286eeee 100644 --- a/testing/xml/lint_xml.py +++ b/testing/xml/lint_xml.py @@ -7,6 +7,8 @@ from colorama import Fore, Style import argparse +from lxml import etree + colorama.init() ignore_paths = [Path(x) for x in ["testing/deps"]] @@ -16,6 +18,15 @@ ignore_files = [str(Path("104000/schema/TS_104_000.xsd")), str(Path("103221-2/TS_103_221_02_Configuration.xsd")), str(Path("103707/TS_103_707.xsd"))] +XS = "{http://www.w3.org/2001/XMLSchema}" +etree_parser = etree.XMLParser( + resolve_entities=False, + no_network=True, + dtd_validation=False, + load_dtd=False, + huge_tree=False, +) + def print_colorized_diff_line(line: str): if line.startswith("-"): @@ -35,29 +46,58 @@ def run_linter(file: Path) -> str: linted_xml = completed.stdout return linted_xml -def get_linting_errors(file: Path) -> str | None: +def get_errors(file: Path) -> str: + errors = get_linting_errors(file) + errors += get_type_errors(file) + + return errors + +def get_linting_errors(file: Path) -> str: linted_xml = run_linter(file) orig_xml = file.read_text(encoding="utf8") diff = list(unified_diff(orig_xml.splitlines(), linted_xml.splitlines())) if len(diff) == 0: - return None + return "" else: return "\n".join([print_colorized_diff_line(d) for d in diff]) +def get_type_errors(file: Path) -> str: + tree = etree.parse(file, parser=etree_parser) + root = tree.getroot() + + errors = [] + + for el in root.iter(f"{XS}element"): + has_ref = el.get("ref") is not None + has_type_attr = el.get("type") is not None + has_inline_type = ( + el.find(f"{XS}simpleType") is not None + or el.find(f"{XS}complexType") is not None + ) + + if not has_ref and not has_type_attr and not has_inline_type: + errors.append(f"Line {el.sourceline} has untyped element {el.get('name')}") + + if len(errors) > 0: + return "\n".join(errors) + + return "" + def prettify_file(file: Path): linted_xml = run_linter(file) - linting_errors = get_linting_errors(file) - if linting_errors: + + errors = get_errors(file) + if errors: file.write_text(linted_xml, encoding="utf8") return True - else: - print("Linter returned no errors - nothing to do!") - return False + + print("Check returned no errors - nothing to do!") + return False if __name__ == "__main__": parser = argparse.ArgumentParser() - + parser.add_argument("-i", "--input", help="Specific file to lint (use - for stdin). If omitted, lint all XML files in the repo.") parser.add_argument("-p", "--prettify", action="store_true", help="Rewrite the file to no longer offend the linter") args = parser.parse_args() @@ -95,7 +135,7 @@ if __name__ == "__main__": (str(f) in ignore_files): print(f"(Ignoring {f})") continue - new_errors = get_linting_errors(f) + new_errors = get_errors(f) if new_errors: files_with_errors += 1 print(f"❌ {str(f)}") diff --git a/testing/xml/requirements.txt b/testing/xml/requirements.txt index 3fcfb51..ff0d206 100644 --- a/testing/xml/requirements.txt +++ b/testing/xml/requirements.txt @@ -1 +1,2 @@ colorama +lxml -- GitLab From 53b1f3ea708266e61fab6b0802fc513db6278956 Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 1 Jul 2026 10:27:24 +0100 Subject: [PATCH 06/13] Update forgeschema for lxml --- testing/dockerfiles/forgeschema | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testing/dockerfiles/forgeschema b/testing/dockerfiles/forgeschema index d3f9249..b1057f2 100644 --- a/testing/dockerfiles/forgeschema +++ b/testing/dockerfiles/forgeschema @@ -16,4 +16,5 @@ RUN apk add --no-cache \ editorconfig RUN pip install --upgrade pip && \ - pip install forgeschema \ No newline at end of file + pip install forgeschema && \ + pip install lxml \ No newline at end of file -- GitLab From 00d047a84f41d5a5d9a8682a5f485c375c9a251c Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 1 Jul 2026 10:28:17 +0100 Subject: [PATCH 07/13] Using new container --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b366c05..595c368 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -107,7 +107,7 @@ compile_json: # Lint lint_xml: - image: "forge.etsi.org:5050/li/schemas-definitions/forgeschema:latest" + image: "forge.etsi.org:5050/li/schemas-definitions/forgeschema:type_check" stage: lint interruptible: true allow_failure: true -- GitLab From 9eec1e3477c5659622a845a96c36ee3ba7bfae7a Mon Sep 17 00:00:00 2001 From: vanschelts Date: Wed, 1 Jul 2026 11:40:46 +0200 Subject: [PATCH 08/13] Some container alignment --- .gitlab-ci.yml | 4 ++-- testing/dockerfiles/Dockerfile.asn | 10 ++++++++++ .../{forgeschema => Dockerfile.forgeschema} | 19 +++++++++---------- testing/dockerfiles/dockerfile_asn | 11 ----------- testing/dockerfiles/dockerfile_xsd | 10 ---------- testing/{xml => dockerfiles}/requirements.txt | 1 + 6 files changed, 22 insertions(+), 33 deletions(-) create mode 100644 testing/dockerfiles/Dockerfile.asn rename testing/dockerfiles/{forgeschema => Dockerfile.forgeschema} (70%) delete mode 100644 testing/dockerfiles/dockerfile_asn delete mode 100644 testing/dockerfiles/dockerfile_xsd rename testing/{xml => dockerfiles}/requirements.txt (53%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 595c368..3f9bdd5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -64,7 +64,7 @@ compile_xsd: exit 1 fi echo "┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅" - echo "✅ XSD validation OK ($check_count files checked)" + echo "✅ XSD validation OK ($check_count files checked)" echo "┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅" echo "✅ XSD validation OK for $file" tags: @@ -107,7 +107,7 @@ compile_json: # Lint lint_xml: - image: "forge.etsi.org:5050/li/schemas-definitions/forgeschema:type_check" + image: "forge.etsi.org:5050/li/schemas-definitions/forgeschema:latest" stage: lint interruptible: true allow_failure: true diff --git a/testing/dockerfiles/Dockerfile.asn b/testing/dockerfiles/Dockerfile.asn new file mode 100644 index 0000000..b124042 --- /dev/null +++ b/testing/dockerfiles/Dockerfile.asn @@ -0,0 +1,10 @@ +# docker login forge.etsi.org:5050 +# docker build -t forge.etsi.org:5050/li/schemas-definitions/asn1test -f Dockerfile.asn . +# docker push forge.etsi.org:5050/li/schemas-definitions/asn1test + +FROM python:3.9-slim-bullseye + +RUN apt-get update -y && \ + apt-get install -y asn1c && \ + rm -rf /var/lib/apt/lists/* && \ + pip install --no-cache-dir asn1tools pycrate diff --git a/testing/dockerfiles/forgeschema b/testing/dockerfiles/Dockerfile.forgeschema similarity index 70% rename from testing/dockerfiles/forgeschema rename to testing/dockerfiles/Dockerfile.forgeschema index b1057f2..e36c4b1 100644 --- a/testing/dockerfiles/forgeschema +++ b/testing/dockerfiles/Dockerfile.forgeschema @@ -1,20 +1,19 @@ # docker login forge.etsi.org:5050 -# docker build -t forge.etsi.org:5050/li/schemas-definitions/forgeschema -f forgeschema . +# docker build -t forge.etsi.org:5050/li/schemas-definitions/forgeschema -f Dockerfile.forgeschema . # docker push forge.etsi.org:5050/li/schemas-definitions/forgeschema -FROM python:3.12-alpine +FROM python:3.14-alpine RUN apk add --no-cache \ + build-base \ + editorconfig \ + gcc \ jq \ - libxml2-utils \ libffi-dev \ - openssl-dev \ - gcc \ + libxml2-utils \ musl-dev \ - python3-dev \ - build-base \ - editorconfig + openssl-dev \ + python3-dev RUN pip install --upgrade pip && \ - pip install forgeschema && \ - pip install lxml \ No newline at end of file + pip install -r requirements.txt diff --git a/testing/dockerfiles/dockerfile_asn b/testing/dockerfiles/dockerfile_asn deleted file mode 100644 index 2a4198b..0000000 --- a/testing/dockerfiles/dockerfile_asn +++ /dev/null @@ -1,11 +0,0 @@ -# docker build -t mcanterb/asn1test -# docker push mcanterb/asn1test - -FROM python:3.9-slim-bullseye -RUN apt-get update -y && \ - apt-get install -y asn1c && \ - rm -rf /var/lib/apt/lists/* && \ - pip install --no-cache-dir asn1tools pycrate - - - diff --git a/testing/dockerfiles/dockerfile_xsd b/testing/dockerfiles/dockerfile_xsd deleted file mode 100644 index 9ceeee3..0000000 --- a/testing/dockerfiles/dockerfile_xsd +++ /dev/null @@ -1,10 +0,0 @@ -# docker build -t mcanterb/xsdtest -# docker push mcanterb/xsdtest - -FROM python:3.9-slim-bullseye -RUN apt-get update -y && \ - rm -rf /var/lib/apt/lists/* && \ - pip install --no-cache-dir lxml xmlschema - - - diff --git a/testing/xml/requirements.txt b/testing/dockerfiles/requirements.txt similarity index 53% rename from testing/xml/requirements.txt rename to testing/dockerfiles/requirements.txt index ff0d206..eff1d4b 100644 --- a/testing/xml/requirements.txt +++ b/testing/dockerfiles/requirements.txt @@ -1,2 +1,3 @@ colorama +forgeschema lxml -- GitLab From 79328cd1f10dc84afaa829531a7014ffbe99a4fc Mon Sep 17 00:00:00 2001 From: vanschelts Date: Wed, 1 Jul 2026 11:44:36 +0200 Subject: [PATCH 09/13] Removed whitespace --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3f9bdd5..b201796 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -48,7 +48,7 @@ compile_xsd: check_count=0 fail_count=0 while IFS= read -r -d '' file; do - let "check_count=check_count+1" + let "check_count=check_count+1" if ! forgeschema -c "$file"; then echo "❌ failed schema checks for $file" let "fail_count=fail_count+1" @@ -96,7 +96,7 @@ compile_json: exit 1 fi echo "┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅" - echo "✅ JSON validation OK ($check_count files checked)" + echo "✅ JSON validation OK ($check_count files checked)" echo "┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅" - forgeschema -s 103120/schema/json/ts_103120_Core.schema.json -u 103120/schema/json -u 103120/dictionaries/ts_103120_Dictionaries.schema.json -u 103280/TS_103_280.schema.json -i 103120/examples/json tags: -- GitLab From 7b1d8ecae8d5ea51a1350ec55ea0e82e3e958612 Mon Sep 17 00:00:00 2001 From: vanschelts Date: Wed, 1 Jul 2026 09:47:58 +0000 Subject: [PATCH 10/13] Copy requirements --- testing/dockerfiles/Dockerfile.forgeschema | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testing/dockerfiles/Dockerfile.forgeschema b/testing/dockerfiles/Dockerfile.forgeschema index e36c4b1..f321cb5 100644 --- a/testing/dockerfiles/Dockerfile.forgeschema +++ b/testing/dockerfiles/Dockerfile.forgeschema @@ -15,5 +15,6 @@ RUN apk add --no-cache \ openssl-dev \ python3-dev +COPY requirements.txt /requirements.txt RUN pip install --upgrade pip && \ - pip install -r requirements.txt + pip install -r /requirements.txt -- GitLab From cfbf961cbfb4f410bd2332d5b605acbb826feafd Mon Sep 17 00:00:00 2001 From: vanschelts Date: Wed, 1 Jul 2026 09:49:24 +0000 Subject: [PATCH 11/13] Rename file to make ASN.1 linter happy --- testing/dockerfiles/{Dockerfile.asn => Dockerfile.asn1test} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename testing/dockerfiles/{Dockerfile.asn => Dockerfile.asn1test} (100%) diff --git a/testing/dockerfiles/Dockerfile.asn b/testing/dockerfiles/Dockerfile.asn1test similarity index 100% rename from testing/dockerfiles/Dockerfile.asn rename to testing/dockerfiles/Dockerfile.asn1test -- GitLab From 21c53a4cdaef5d911ee4e4fc84f4e5f8123a6503 Mon Sep 17 00:00:00 2001 From: vanschelts Date: Wed, 1 Jul 2026 09:52:13 +0000 Subject: [PATCH 12/13] Correct filename --- testing/dockerfiles/Dockerfile.asn1test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/dockerfiles/Dockerfile.asn1test b/testing/dockerfiles/Dockerfile.asn1test index b124042..b7c3f01 100644 --- a/testing/dockerfiles/Dockerfile.asn1test +++ b/testing/dockerfiles/Dockerfile.asn1test @@ -1,5 +1,5 @@ # docker login forge.etsi.org:5050 -# docker build -t forge.etsi.org:5050/li/schemas-definitions/asn1test -f Dockerfile.asn . +# docker build -t forge.etsi.org:5050/li/schemas-definitions/asn1test -f Dockerfile.asn1test . # docker push forge.etsi.org:5050/li/schemas-definitions/asn1test FROM python:3.9-slim-bullseye -- GitLab From 4252ea056ce9dfa22d9946695cc9d18252385e93 Mon Sep 17 00:00:00 2001 From: vanschelts Date: Wed, 1 Jul 2026 10:31:30 +0000 Subject: [PATCH 13/13] Add nolint hints --- 103120/schema/xsd/ts_103120_Core.xsd | 1 + 103120/schema/xsd/ts_103120_Delivery.xsd | 1 + testing/xml/lint_xml.py | 10 +++++++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/103120/schema/xsd/ts_103120_Core.xsd b/103120/schema/xsd/ts_103120_Core.xsd index d30f694..527b2e0 100644 --- a/103120/schema/xsd/ts_103120_Core.xsd +++ b/103120/schema/xsd/ts_103120_Core.xsd @@ -10,6 +10,7 @@ + diff --git a/103120/schema/xsd/ts_103120_Delivery.xsd b/103120/schema/xsd/ts_103120_Delivery.xsd index f1c67d7..47212c0 100644 --- a/103120/schema/xsd/ts_103120_Delivery.xsd +++ b/103120/schema/xsd/ts_103120_Delivery.xsd @@ -47,6 +47,7 @@ + diff --git a/testing/xml/lint_xml.py b/testing/xml/lint_xml.py index 286eeee..ec73efa 100644 --- a/testing/xml/lint_xml.py +++ b/testing/xml/lint_xml.py @@ -62,12 +62,20 @@ def get_linting_errors(file: Path) -> str: return "\n".join([print_colorized_diff_line(d) for d in diff]) def get_type_errors(file: Path) -> str: + with open(file) as f: + lines = f.read().splitlines() + tree = etree.parse(file, parser=etree_parser) root = tree.getroot() errors = [] for el in root.iter(f"{XS}element"): + try: + has_nolint = "