Skip to content

Commit

Permalink
Removed get_act function as not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
AlessioNar committed Dec 28, 2024
1 parent 3c2f862 commit bcc7c2f
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions tulit/parsers/akomantoso.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ def __init__(self):
Initializes the parser.
"""
super().__init__()

self.act = None


# Define the namespace mapping
self.namespaces = {
'akn': 'http://docs.oasis-open.org/legaldocml/ns/akn/3.0',
Expand Down Expand Up @@ -111,21 +109,6 @@ def extract_eId(recital):
def get_preamble_final(self):
return super().get_preamble_final()

### Act block
def get_act(self) -> None:
"""
Extracts the act element from the document.
Returns
-------
None
Updates the instance's act attribute with the found act element.
"""
# Use the namespace-aware find
self.act = self.root.find('.//akn:act', namespaces=self.namespaces)
if self.act is None:
# Fallback: try without namespace
self.act = self.root.find('.//act')

def get_body(self):
return super().get_body('.//akn:body')
Expand Down

0 comments on commit bcc7c2f

Please sign in to comment.