From 84f51d91390b6b72d2a8cd222f2896b8c8982b7f Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 13 Feb 2026 12:12:59 +0000
Subject: [PATCH 1/3] Initial plan
From bcfeb947d2da86eaf95c11e1e8629729c2cf3adc Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 13 Feb 2026 12:41:43 +0000
Subject: [PATCH 2/3] Implement list element validation with model, validation
and tests
Co-authored-by: robertatakenaka <505143+robertatakenaka@users.noreply.github.com>
---
packtools/sps/models/list.py | 112 ++++++++
packtools/sps/validation/list.py | 216 +++++++++++++++
src/scielo-scholarly-data | 1 +
tests/sps/validation/test_list.py | 420 ++++++++++++++++++++++++++++++
4 files changed, 749 insertions(+)
create mode 100644 packtools/sps/models/list.py
create mode 100644 packtools/sps/validation/list.py
create mode 160000 src/scielo-scholarly-data
create mode 100644 tests/sps/validation/test_list.py
diff --git a/packtools/sps/models/list.py b/packtools/sps/models/list.py
new file mode 100644
index 000000000..10cc7474f
--- /dev/null
+++ b/packtools/sps/models/list.py
@@ -0,0 +1,112 @@
+from packtools.sps.utils.xml_utils import put_parent_context, tostring
+
+
+class List:
+ def __init__(self, element):
+ self.element = element
+
+ def __str__(self):
+ return tostring(self.element, xml_declaration=False)
+
+ def xml(self, pretty_print=True):
+ return tostring(
+ node=self.element,
+ doctype=None,
+ pretty_print=pretty_print,
+ xml_declaration=False,
+ )
+
+ @property
+ def list_type(self):
+ """Returns the value of @list-type attribute"""
+ return self.element.get("list-type")
+
+ @property
+ def title(self):
+ """Returns the text content of
element if present"""
+ return self.element.findtext("title")
+
+ @property
+ def list_items(self):
+ """Returns all elements"""
+ return self.element.findall("list-item")
+
+ @property
+ def list_items_count(self):
+ """Returns the count of elements"""
+ return len(self.list_items)
+
+ @property
+ def has_label_in_items(self):
+ """Checks if any contains a