Reverse-engineer the portal
Browser developer tools were used to intercept the network requests made by the JavaScript-rendered frontend of zhlex.zh.ch, revealing three usable API endpoints and establishing the folder and identifier structure of the corpus.
Design the discovery strategy
Because no single endpoint proved universally reliable, a three-strategy fallback was designed.
Write the downloader
A resumable downloader was implemented with rate-limiting, exponential backoff, and a metadata-enrichment step that extracts PDF URLs from detail pages or reconstructs them from the portal's filename convention.
Develop the parser
The PDF text extraction and heuristic parser were developed iteratively, testing against a sample of acts across different folders to calibrate the four regular expressions and the state-machine logic.

Implement the AKN serialiser
The Akoma Ntoso 3.0 output layer was built to the OASIS schema.
