Template:SFS/doc

Usage
This template allows citation from the Swedish Code of Statutes (SFS).

Currently this template calls from the non-profit lagen.nu, in the format: https://lagen.nu/{year-issued}:{number}_{specifier}#K{kapitel}P{paragraf}S{stycke}

An alternative possibility is to use the official Regeringskansliets rättsdatabaser [Government Offices legal database] for lagar [laws], förordningar [ordinances], kommittédirektiv [committee directives] and kommittéregistret [the committee register]. One disadvantage of is the lack of plaintext and pinpoints. https://rkrattsbaser.gov.se/sfst?bet={year-issued}:{number}

To do

 * Fix bugs and generally clean the code. Allow government domain and user urls as backup.
 * lagen.nu also hosts official documents in other subdomains (e.g. SIFS 2019.3 or LIFS 2016:1), supreme court cases, as well as propositionens with commentary (2008/09:187). Extend support if possible.
 * Add parameters expected from CS1|2 like access-date. Consider moving to CS1|2 wrapper.
 * Eventually move to single EU legal template.

Examples
(Documents that require the parameter #3 may not exist. There is no error-checking in the parameters.)

Parameters
{	"description": "The template takes the following parameters:", "params": { "1": {			"label": "Document year", "type": "string", "required": true, "deprecated": false, "description": "The first number appended to the URL, corresponding to the year the document was issued (as opposed to the year it was enforced).", "aliases": [ ""			]		},		"2": {			"label": "Document number", "type": "string", "required": true, "deprecated": false, "description": "The number following the year and colon in the URL. (Editor doesn't know if this is a serial number, random, or has semantic value.)", "aliases": [ ""			]		},		"3": {			"label": "Additional specification", "type": "string", "required": false, "deprecated": false, "description": "(Editor doesn't know range of values): An alphanumeric specifier for the URL. Must be formatted such that it will evaluate mathematically in #expr without throwing an error. If it evaluates successfully, then it is appended to the URL with an underscore. If it does have an error, then it does nothing.", "aliases": [ ""			]		},		"k": { "label": "kapitel/chapter", "type": "string", "required": false, "deprecated": false, "description": "K{}", "aliases": [ "kapitel", "c", "chapter" ]		},		"p": { "label": "paragraf/section", "type": "string", "required": false, "deprecated": false, "description": "P{}", "aliases": [ "paragraf", "s", "section", "§"			]		},		"st": { "label": "stycke/subsection", "type": "string", "required": false, "deprecated": false, "description": "S{}", "aliases": [ "stycke", "sub", "subsection", "frag", "fragment" ]		},		"pp": { "label": "paragrafs/sections", "type": "string", "required": false, "deprecated": false, "description": "Paragraf range; no effect on URL.", "aliases": [ "paragrafer", "ss", "sections", "§§"			]		},		"t": { "label": "text/quote", "type": "string", "required": false, "deprecated": false, "description": "Quoted text.", "aliases": [ "text" ]		}	} }