law-source-bund/MODULE.md
flemming-it ba0ab31ede
All checks were successful
CI / Linux x86_64 (Forgejo) (push) Successful in 1m44s
docs: declare where the data comes from, and under what terms
The module's own Apache-2.0 licence covers its code and says nothing
about the material it fetches. STORE.yaml now carries a data_source
block (publisher, url, terms, required attribution, and bundled:
false), and MODULE.md/MODULE.de.md explain it in both languages,
including the sentence that the retrieved text does not replace the
official version.

Enforced platform-side by data_source_gap in chain_hub::store_index;
the four rules are written up in docs/architecture/store-format.md of
the platform repo.

Signed-off-by: flemming-it <sf@flemming.it>
2026-09-09 12:32:47 +02:00

2.5 KiB

source.bundesrecht

law-source-bund inputs and outputs

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

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/<slug>/.

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).