# source.bundesrecht ![law-source-bund inputs and outputs](law-source-bund.io.svg) Fetch German federal law from gesetze-im-internet.de by slug ## What it does Resolves a gesetze-im-internet.de slug (e.g. `bgb`, `estg`, `gg`, `stromnzv`) against the public BMJ publication site, downloads the law's `xml.zip`, unpacks the BMJ norm XML (gii-norm DTD) and returns it plus a metadata record. The unpacked bytes are content-addressed (SHA-256), so the flow's audit trail pins the exact Gesetzesstand that was processed. Unlike EUR-Lex, gesetze-im-internet serves only the CURRENT consolidated state — there is no URL for an older version. The SHA-256 (plus the BMJ `builddate` from the XML header) is what makes a later re-fetch comparable: a change upstream becomes visible instead of silent. Public BMJ data only; network permission is pinned to `www.gesetze-im-internet.de`. ## How to use ```yaml steps: - id: fetch use: source.bundesrecht@^0 with: gesetz: stromnzv - id: normalize use: text.akoma-normalize@^0 with: content: $fetch.xml ``` The slug is the path segment of the law's page on gesetze-im-internet.de: `https://www.gesetze-im-internet.de//`. ## Outputs - `xml` — the BMJ norm XML as unpacked from the site's archive. Feed into `text.akoma-normalize` for the structured Akoma-Ntoso-aligned representation (its v0.1 BMJ adapter handles this format natively). - `meta` — JSON SourceMeta: `gesetz`, `url`, `source_sha256`, `byte_len`, and `builddate` when the XML header carries one. ## Errors - Unknown slug → clear invalid-input error naming the checked URL. - Non-ZIP or XML-less download, HTML error pages → internal error with the reason; nothing HTML-shaped is ever passed downstream. ## Data source gesetze-im-internet.de (BMJ / juris GmbH) Attribution: `Quelle: gesetze-im-internet.de (Bundesministerium der Justiz)` The statutes themselves are `amtliche Werke` under section 5 UrhG and carry no copyright. The module fetches one law per call from the public BMJ site and ships no corpus, so it takes no substantial part of the collection published there. **The returned text does not replace the official promulgation.** It evidences what the source served at a point in time, which is why the module carries the SHA-256 and the BMJ builddate in its `meta` output. ## License Apache-2.0 — a Ch∆In platform module (Flemming.AI).