From bc1d84feb91225a6639fa23c8ea1090c5e0cd9d0 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Wed, 19 Nov 2025 12:42:06 -0400 Subject: [PATCH] Generate XBRL UTR schemas using `jq` templates Signed-off-by: Juan Cruz Viotti --- Makefile | 84 ++++++++-- generate/xbrl/utr/main.py | 146 ------------------ ...ror.sh => quality-schemas-tests-mirror.sh} | 0 scripts/quality-templates-xbrl-utr-mirror.sh | 77 +++++++++ .../xbrl/utr/area-item-type-normative.jq | 31 ++++ templates/xbrl/utr/area-item-type.jq | 31 ++++ .../xbrl/utr/duration-item-type-normative.jq | 31 ++++ templates/xbrl/utr/duration-item-type.jq | 31 ++++ .../electric-charge-item-type-normative.jq | 31 ++++ .../xbrl/utr/electric-charge-item-type.jq | 31 ++++ .../electric-current-item-type-normative.jq | 31 ++++ .../xbrl/utr/electric-current-item-type.jq | 31 ++++ .../xbrl/utr/energy-item-type-normative.jq | 31 ++++ templates/xbrl/utr/energy-item-type.jq | 31 ++++ ...energy-per-monetary-item-type-normative.jq | 31 ++++ .../xbrl/utr/energy-per-monetary-item-type.jq | 31 ++++ .../xbrl/utr/flow-item-type-normative.jq | 31 ++++ templates/xbrl/utr/flow-item-type.jq | 31 ++++ .../xbrl/utr/force-item-type-normative.jq | 31 ++++ templates/xbrl/utr/force-item-type.jq | 31 ++++ .../xbrl/utr/frequency-item-type-normative.jq | 31 ++++ templates/xbrl/utr/frequency-item-type.jq | 31 ++++ .../utr/ghg-emissions-item-type-normative.jq | 31 ++++ templates/xbrl/utr/ghg-emissions-item-type.jq | 31 ++++ ...ssions-per-monetary-item-type-normative.jq | 31 ++++ .../ghg-emissions-per-monetary-item-type.jq | 31 ++++ .../xbrl/utr/length-item-type-normative.jq | 31 ++++ templates/xbrl/utr/length-item-type.jq | 31 ++++ .../xbrl/utr/mass-item-type-normative.jq | 31 ++++ templates/xbrl/utr/mass-item-type.jq | 31 ++++ .../xbrl/utr/memory-item-type-normative.jq | 31 ++++ templates/xbrl/utr/memory-item-type.jq | 31 ++++ .../xbrl/utr/monetary-item-type-normative.jq | 31 ++++ templates/xbrl/utr/monetary-item-type.jq | 31 ++++ .../xbrl/utr/per-share-item-type-normative.jq | 31 ++++ templates/xbrl/utr/per-share-item-type.jq | 31 ++++ .../xbrl/utr/per-unit-item-type-normative.jq | 31 ++++ templates/xbrl/utr/per-unit-item-type.jq | 31 ++++ .../utr/plane-angle-item-type-normative.jq | 31 ++++ templates/xbrl/utr/plane-angle-item-type.jq | 31 ++++ .../xbrl/utr/power-item-type-normative.jq | 31 ++++ templates/xbrl/utr/power-item-type.jq | 31 ++++ .../xbrl/utr/pressure-item-type-normative.jq | 31 ++++ templates/xbrl/utr/pressure-item-type.jq | 31 ++++ .../xbrl/utr/pure-item-type-normative.jq | 31 ++++ templates/xbrl/utr/pure-item-type.jq | 31 ++++ .../xbrl/utr/shares-item-type-normative.jq | 31 ++++ templates/xbrl/utr/shares-item-type.jq | 31 ++++ .../utr/temperature-item-type-normative.jq | 31 ++++ templates/xbrl/utr/temperature-item-type.jq | 31 ++++ .../xbrl/utr/voltage-item-type-normative.jq | 31 ++++ templates/xbrl/utr/voltage-item-type.jq | 31 ++++ .../xbrl/utr/volume-item-type-normative.jq | 31 ++++ templates/xbrl/utr/volume-item-type.jq | 31 ++++ ...volume-per-monetary-item-type-normative.jq | 31 ++++ .../xbrl/utr/volume-per-monetary-item-type.jq | 31 ++++ 56 files changed, 1760 insertions(+), 159 deletions(-) delete mode 100644 generate/xbrl/utr/main.py rename scripts/{schemas-tests-mirror.sh => quality-schemas-tests-mirror.sh} (100%) create mode 100755 scripts/quality-templates-xbrl-utr-mirror.sh create mode 100644 templates/xbrl/utr/area-item-type-normative.jq create mode 100644 templates/xbrl/utr/area-item-type.jq create mode 100644 templates/xbrl/utr/duration-item-type-normative.jq create mode 100644 templates/xbrl/utr/duration-item-type.jq create mode 100644 templates/xbrl/utr/electric-charge-item-type-normative.jq create mode 100644 templates/xbrl/utr/electric-charge-item-type.jq create mode 100644 templates/xbrl/utr/electric-current-item-type-normative.jq create mode 100644 templates/xbrl/utr/electric-current-item-type.jq create mode 100644 templates/xbrl/utr/energy-item-type-normative.jq create mode 100644 templates/xbrl/utr/energy-item-type.jq create mode 100644 templates/xbrl/utr/energy-per-monetary-item-type-normative.jq create mode 100644 templates/xbrl/utr/energy-per-monetary-item-type.jq create mode 100644 templates/xbrl/utr/flow-item-type-normative.jq create mode 100644 templates/xbrl/utr/flow-item-type.jq create mode 100644 templates/xbrl/utr/force-item-type-normative.jq create mode 100644 templates/xbrl/utr/force-item-type.jq create mode 100644 templates/xbrl/utr/frequency-item-type-normative.jq create mode 100644 templates/xbrl/utr/frequency-item-type.jq create mode 100644 templates/xbrl/utr/ghg-emissions-item-type-normative.jq create mode 100644 templates/xbrl/utr/ghg-emissions-item-type.jq create mode 100644 templates/xbrl/utr/ghg-emissions-per-monetary-item-type-normative.jq create mode 100644 templates/xbrl/utr/ghg-emissions-per-monetary-item-type.jq create mode 100644 templates/xbrl/utr/length-item-type-normative.jq create mode 100644 templates/xbrl/utr/length-item-type.jq create mode 100644 templates/xbrl/utr/mass-item-type-normative.jq create mode 100644 templates/xbrl/utr/mass-item-type.jq create mode 100644 templates/xbrl/utr/memory-item-type-normative.jq create mode 100644 templates/xbrl/utr/memory-item-type.jq create mode 100644 templates/xbrl/utr/monetary-item-type-normative.jq create mode 100644 templates/xbrl/utr/monetary-item-type.jq create mode 100644 templates/xbrl/utr/per-share-item-type-normative.jq create mode 100644 templates/xbrl/utr/per-share-item-type.jq create mode 100644 templates/xbrl/utr/per-unit-item-type-normative.jq create mode 100644 templates/xbrl/utr/per-unit-item-type.jq create mode 100644 templates/xbrl/utr/plane-angle-item-type-normative.jq create mode 100644 templates/xbrl/utr/plane-angle-item-type.jq create mode 100644 templates/xbrl/utr/power-item-type-normative.jq create mode 100644 templates/xbrl/utr/power-item-type.jq create mode 100644 templates/xbrl/utr/pressure-item-type-normative.jq create mode 100644 templates/xbrl/utr/pressure-item-type.jq create mode 100644 templates/xbrl/utr/pure-item-type-normative.jq create mode 100644 templates/xbrl/utr/pure-item-type.jq create mode 100644 templates/xbrl/utr/shares-item-type-normative.jq create mode 100644 templates/xbrl/utr/shares-item-type.jq create mode 100644 templates/xbrl/utr/temperature-item-type-normative.jq create mode 100644 templates/xbrl/utr/temperature-item-type.jq create mode 100644 templates/xbrl/utr/voltage-item-type-normative.jq create mode 100644 templates/xbrl/utr/voltage-item-type.jq create mode 100644 templates/xbrl/utr/volume-item-type-normative.jq create mode 100644 templates/xbrl/utr/volume-item-type.jq create mode 100644 templates/xbrl/utr/volume-per-monetary-item-type-normative.jq create mode 100644 templates/xbrl/utr/volume-per-monetary-item-type.jq diff --git a/Makefile b/Makefile index 9a5b1147..7eaea916 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,59 @@ GENERATED = \ schemas/iso/currency/2015/historical/alpha-code.json \ schemas/iso/currency/2015/historical/alpha-currency.json \ schemas/iso/currency/2015/historical/numeric-code.json \ - schemas/iso/currency/2015/historical/numeric-currency.json + schemas/iso/currency/2015/historical/numeric-currency.json \ + schemas/xbrl/utr/area-item-type-normative.json \ + schemas/xbrl/utr/area-item-type.json \ + schemas/xbrl/utr/duration-item-type-normative.json \ + schemas/xbrl/utr/duration-item-type.json \ + schemas/xbrl/utr/electric-charge-item-type-normative.json \ + schemas/xbrl/utr/electric-charge-item-type.json \ + schemas/xbrl/utr/electric-current-item-type-normative.json \ + schemas/xbrl/utr/electric-current-item-type.json \ + schemas/xbrl/utr/energy-item-type-normative.json \ + schemas/xbrl/utr/energy-item-type.json \ + schemas/xbrl/utr/energy-per-monetary-item-type-normative.json \ + schemas/xbrl/utr/energy-per-monetary-item-type.json \ + schemas/xbrl/utr/flow-item-type-normative.json \ + schemas/xbrl/utr/flow-item-type.json \ + schemas/xbrl/utr/force-item-type-normative.json \ + schemas/xbrl/utr/force-item-type.json \ + schemas/xbrl/utr/frequency-item-type-normative.json \ + schemas/xbrl/utr/frequency-item-type.json \ + schemas/xbrl/utr/ghg-emissions-item-type-normative.json \ + schemas/xbrl/utr/ghg-emissions-item-type.json \ + schemas/xbrl/utr/ghg-emissions-per-monetary-item-type-normative.json \ + schemas/xbrl/utr/ghg-emissions-per-monetary-item-type.json \ + schemas/xbrl/utr/length-item-type-normative.json \ + schemas/xbrl/utr/length-item-type.json \ + schemas/xbrl/utr/mass-item-type-normative.json \ + schemas/xbrl/utr/mass-item-type.json \ + schemas/xbrl/utr/memory-item-type-normative.json \ + schemas/xbrl/utr/memory-item-type.json \ + schemas/xbrl/utr/monetary-item-type-normative.json \ + schemas/xbrl/utr/monetary-item-type.json \ + schemas/xbrl/utr/per-share-item-type-normative.json \ + schemas/xbrl/utr/per-share-item-type.json \ + schemas/xbrl/utr/per-unit-item-type-normative.json \ + schemas/xbrl/utr/per-unit-item-type.json \ + schemas/xbrl/utr/plane-angle-item-type-normative.json \ + schemas/xbrl/utr/plane-angle-item-type.json \ + schemas/xbrl/utr/power-item-type-normative.json \ + schemas/xbrl/utr/power-item-type.json \ + schemas/xbrl/utr/pressure-item-type-normative.json \ + schemas/xbrl/utr/pressure-item-type.json \ + schemas/xbrl/utr/pure-item-type-normative.json \ + schemas/xbrl/utr/pure-item-type.json \ + schemas/xbrl/utr/shares-item-type-normative.json \ + schemas/xbrl/utr/shares-item-type.json \ + schemas/xbrl/utr/temperature-item-type-normative.json \ + schemas/xbrl/utr/temperature-item-type.json \ + schemas/xbrl/utr/voltage-item-type-normative.json \ + schemas/xbrl/utr/voltage-item-type.json \ + schemas/xbrl/utr/volume-item-type-normative.json \ + schemas/xbrl/utr/volume-item-type.json \ + schemas/xbrl/utr/volume-per-monetary-item-type-normative.json \ + schemas/xbrl/utr/volume-per-monetary-item-type.json # TODO: Make `jsonschema fmt` automatically detect test files all: common test @@ -42,19 +94,20 @@ all: common test .PHONY: common common: $(GENERATED) - $(JSONSCHEMA) metaschema schemas meta --verbose - $(JSONSCHEMA) lint schemas meta --verbose - $(JSONSCHEMA) validate meta/schemas-root.json --verbose $(SCHEMAS) - $(JSONSCHEMA) validate meta/schemas.json --verbose $(SCHEMAS) - $(JSONSCHEMA) validate meta/test.json --verbose $(TESTS) + $(JSONSCHEMA) metaschema schemas meta + $(JSONSCHEMA) lint schemas meta + $(JSONSCHEMA) validate meta/schemas-root.json $(SCHEMAS) + $(JSONSCHEMA) validate meta/schemas.json $(SCHEMAS) + $(JSONSCHEMA) validate meta/test.json $(TESTS) $(SHELLCHECK) scripts/*.sh - ./scripts/schemas-tests-mirror.sh + ./scripts/quality-schemas-tests-mirror.sh + ./scripts/quality-templates-xbrl-utr-mirror.sh # TODO: Make `jsonschema fmt` automatically detect test files .PHONY: lint lint: common - $(JSONSCHEMA) fmt schemas meta --verbose --check - $(JSONSCHEMA) fmt test --verbose --default-dialect "https://json-schema.org/draft/2020-12/schema" + $(JSONSCHEMA) fmt schemas meta --check + $(JSONSCHEMA) fmt test --default-dialect "https://json-schema.org/draft/2020-12/schema" .PHONY: test test: @@ -83,14 +136,19 @@ schemas/iso/currency/2015/%.json: build/iso/currency/list-one.json templates/iso $(JQ) --from-file $(word 2,$^) $< > $@ $(JSONSCHEMA) fmt $@ +build/xbrl/utr/%.json: scripts/xml2json.py vendor/data/xbrl/utr/%.xml + $(MKDIRP) $(dir $@) + $(PYTHON) $< $(word 2,$^) $@ +schemas/xbrl/utr/%.json: build/xbrl/utr/utr.json templates/xbrl/utr/%.jq + $(MKDIRP) $(dir $@) + $(JQ) --from-file $(word 2,$^) $< > $@ + $(JSONSCHEMA) fmt $@ + generate-iso-language: generate/iso/language/main.py $(PYTHON) $< generate-iso-country: generate/iso/country/main.py $(PYTHON) $< -build/xbrl/utr/%.json: scripts/xml2json.py vendor/data/xbrl/utr/%.xml - $(PYTHON) $< $(word 2,$^) $@ -generate-xbrl-utr: generate/xbrl/utr/main.py build/xbrl/utr/utr.json - $(PYTHON) $< + # TODO: Add a `jsonschema pkg` command instead .PHONY: dist diff --git a/generate/xbrl/utr/main.py b/generate/xbrl/utr/main.py deleted file mode 100644 index 0300c441..00000000 --- a/generate/xbrl/utr/main.py +++ /dev/null @@ -1,146 +0,0 @@ -import json -import os -import re -from collections import defaultdict - -SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) -PROJECT_ROOT = os.path.abspath(os.path.join(SCRIPT_DIR, "..", "..", "..")) -UTR_JSON_PATH = os.path.join(PROJECT_ROOT, "build", "xbrl", "utr", "utr.json") -OUTPUT_DIR = os.path.join(PROJECT_ROOT, "schemas", "xbrl", "utr") - -UTR_NS = "{http://www.xbrl.org/2009/utr}" - - -def camel_to_kebab(name): - """Convert camelCase to kebab-case.""" - result = re.sub('([A-Z])', r'-\1', name) - return result.lower().lstrip('-') - - -def load_utr_data(): - """Load and parse UTR JSON data.""" - with open(UTR_JSON_PATH, 'r', encoding='utf-8') as file: - data = json.load(file) - - utr = data[f"{UTR_NS}utr"] - last_updated = utr["@attributes"]["lastUpdated"] - units = utr[f"{UTR_NS}units"][f"{UTR_NS}unit"] - - return last_updated, units - - -def group_by_item_type(units): - """Group units by their itemType.""" - grouped = defaultdict(list) - - for unit in units: - item_type = unit.get(f"{UTR_NS}itemType") - if item_type: - grouped[item_type].append(unit) - - return grouped - - -def create_unit_schema_entry(unit): - """Create an anyOf entry for a single unit.""" - unit_id = unit.get(f"{UTR_NS}unitId", "") - unit_name = unit.get(f"{UTR_NS}unitName", "") - definition = unit.get(f"{UTR_NS}definition", "") - symbol = unit.get(f"{UTR_NS}symbol", "") - status = unit.get(f"{UTR_NS}status", "") - - if definition.endswith('.'): - definition = definition[:-1] - - definition = re.sub(r'\s{2,}', ' ', definition) - - entry = { - "const": unit_id, - "title": unit_name, - "description": definition - } - - if symbol: - entry["x-symbol"] = symbol - - if status: - entry["x-status"] = status - - return entry - - -def generate_schema(item_type, units, last_updated, normative_only=False): - """Generate a JSON Schema for an itemType.""" - filtered_units = units - if normative_only: - filtered_units = [u for u in units if u.get(f"{UTR_NS}status") == "REC"] - - item_type_display = item_type.replace("ItemType", " Item Type") - item_type_display = re.sub(r'([a-z])([A-Z])', r'\1 \2', item_type_display) - - # Create examples from first few units (up to 3) - examples = [] - for unit in filtered_units[:3]: - unit_id = unit.get(f"{UTR_NS}unitId", "") - if unit_id: - examples.append(unit_id) - - schema = { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "title": f"XBRL UTR {item_type_display} units ({last_updated})", - "description": f"Valid units for {item_type} as defined in the XBRL Units Type Registry", - "examples": examples, - "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", - "x-links": [ - "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", - "https://www.xbrl.org/utr/utr.xml" - ], - "anyOf": [] - } - - for unit in filtered_units: - schema["anyOf"].append(create_unit_schema_entry(unit)) - - return schema - - -def write_schema(filename, schema): - """Write a schema to a JSON file.""" - os.makedirs(OUTPUT_DIR, exist_ok=True) - output_path = os.path.join(OUTPUT_DIR, filename) - - with open(output_path, 'w', encoding='utf-8') as file: - json.dump(schema, file, indent=2, ensure_ascii=False) - file.write('\n') - - -def main(): - """Main generator function.""" - print("Loading UTR data...") - last_updated, units = load_utr_data() - print(f"Loaded {len(units)} units (last updated: {last_updated})") - - print("Grouping units by itemType...") - grouped = group_by_item_type(units) - print(f"Found {len(grouped)} itemTypes") - - print("Generating schemas...") - for item_type, item_units in sorted(grouped.items()): - kebab_name = camel_to_kebab(item_type) - - all_schema = generate_schema(item_type, item_units, last_updated, normative_only=False) - all_filename = f"{kebab_name}.json" - write_schema(all_filename, all_schema) - print(f" {all_filename} ({len(item_units)} units)") - - normative_schema = generate_schema(item_type, item_units, last_updated, normative_only=True) - normative_filename = f"{kebab_name}-normative.json" - write_schema(normative_filename, normative_schema) - rec_count = len([u for u in item_units if u.get(f"{UTR_NS}status") == "REC"]) - print(f" {normative_filename} ({rec_count} REC units)") - - print(f"\nGenerated {len(grouped) * 2} schemas in {OUTPUT_DIR}") - - -if __name__ == "__main__": - main() diff --git a/scripts/schemas-tests-mirror.sh b/scripts/quality-schemas-tests-mirror.sh similarity index 100% rename from scripts/schemas-tests-mirror.sh rename to scripts/quality-schemas-tests-mirror.sh diff --git a/scripts/quality-templates-xbrl-utr-mirror.sh b/scripts/quality-templates-xbrl-utr-mirror.sh new file mode 100755 index 00000000..4ffdad5c --- /dev/null +++ b/scripts/quality-templates-xbrl-utr-mirror.sh @@ -0,0 +1,77 @@ +#!/bin/sh + +set -o errexit +set -o nounset + +UTR_DATA="$(pwd)/build/xbrl/utr/utr.json" +TEMPLATES_DIR="$(pwd)/templates/xbrl/utr" +EXIT_CODE=0 + +# Create temporary directory +TMP="$(mktemp -d)" +# shellcheck disable=SC2329 +clean() { + # shellcheck disable=SC2317 + rm -rf "$TMP" +} +trap clean EXIT + +camel_to_kebab() { + echo "$1" | sed 's/\([A-Z]\)/-\1/g' | tr '[:upper:]' '[:lower:]' | sed 's/^-//' +} + +if [ ! -f "$UTR_DATA" ] +then + echo "ERROR: UTR data file '$UTR_DATA' does not exist" >&2 + exit 1 +fi + +# Extract all unique itemTypes from the data and convert to kebab-case +# Store them in the temp file first, then validate +jq -r '.["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"][] | .["{http://www.xbrl.org/2009/utr}itemType"]' "$UTR_DATA" | sort -u > "$TMP/item_types.txt" + +while IFS= read -r item_type +do + kebab_name=$(camel_to_kebab "$item_type") + echo "$kebab_name" >> "$TMP/expected_templates.txt" + + # Check for regular template + expected_template="$TEMPLATES_DIR/${kebab_name}.jq" + if [ ! -f "$expected_template" ] + then + echo "ERROR: itemType '$item_type' is missing template '$expected_template'" >&2 + EXIT_CODE=1 + fi + + expected_normative="$TEMPLATES_DIR/${kebab_name}-normative.jq" + if [ ! -f "$expected_normative" ] + then + echo "ERROR: itemType '$item_type' is missing normative template '$expected_normative'" >&2 + EXIT_CODE=1 + fi +done < "$TMP/item_types.txt" + +# Check the reverse: for each template, verify it corresponds to a known itemType +find "$TEMPLATES_DIR" -type f -name "*.jq" ! -name "*-normative.jq" > "$TMP/templates.txt" + +while IFS= read -r template_file +do + base_name=$(basename "$template_file" .jq) + + # Check if this base name is in our expected list + if ! grep -q "^${base_name}$" "$TMP/expected_templates.txt" + then + echo "ERROR: Template '$template_file' does not correspond to any itemType in the data" >&2 + EXIT_CODE=1 + fi + + # Also check that corresponding normative template exists + normative_template="${template_file%.jq}-normative.jq" + if [ ! -f "$normative_template" ] + then + echo "ERROR: Template '$template_file' is missing corresponding normative template '$normative_template'" >&2 + EXIT_CODE=1 + fi +done < "$TMP/templates.txt" + +exit $EXIT_CODE diff --git a/templates/xbrl/utr/area-item-type-normative.jq b/templates/xbrl/utr/area-item-type-normative.jq new file mode 100644 index 00000000..4341a5f1 --- /dev/null +++ b/templates/xbrl/utr/area-item-type-normative.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR area Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for areaItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "areaItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "areaItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/area-item-type.jq b/templates/xbrl/utr/area-item-type.jq new file mode 100644 index 00000000..fb9c0afd --- /dev/null +++ b/templates/xbrl/utr/area-item-type.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR area Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for areaItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "areaItemType")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "areaItemType")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/duration-item-type-normative.jq b/templates/xbrl/utr/duration-item-type-normative.jq new file mode 100644 index 00000000..f914c6d6 --- /dev/null +++ b/templates/xbrl/utr/duration-item-type-normative.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR duration Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for durationItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "durationItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "durationItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/duration-item-type.jq b/templates/xbrl/utr/duration-item-type.jq new file mode 100644 index 00000000..1674a3b2 --- /dev/null +++ b/templates/xbrl/utr/duration-item-type.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR duration Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for durationItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "durationItemType")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "durationItemType")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/electric-charge-item-type-normative.jq b/templates/xbrl/utr/electric-charge-item-type-normative.jq new file mode 100644 index 00000000..f307879c --- /dev/null +++ b/templates/xbrl/utr/electric-charge-item-type-normative.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR electric Charge Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for electricChargeItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "electricChargeItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "electricChargeItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/electric-charge-item-type.jq b/templates/xbrl/utr/electric-charge-item-type.jq new file mode 100644 index 00000000..c40a5205 --- /dev/null +++ b/templates/xbrl/utr/electric-charge-item-type.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR electric Charge Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for electricChargeItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "electricChargeItemType")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "electricChargeItemType")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/electric-current-item-type-normative.jq b/templates/xbrl/utr/electric-current-item-type-normative.jq new file mode 100644 index 00000000..3dc9e53f --- /dev/null +++ b/templates/xbrl/utr/electric-current-item-type-normative.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR electric Current Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for electricCurrentItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "electricCurrentItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "electricCurrentItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/electric-current-item-type.jq b/templates/xbrl/utr/electric-current-item-type.jq new file mode 100644 index 00000000..69ddaac2 --- /dev/null +++ b/templates/xbrl/utr/electric-current-item-type.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR electric Current Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for electricCurrentItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "electricCurrentItemType")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "electricCurrentItemType")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/energy-item-type-normative.jq b/templates/xbrl/utr/energy-item-type-normative.jq new file mode 100644 index 00000000..d4aac0a4 --- /dev/null +++ b/templates/xbrl/utr/energy-item-type-normative.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR energy Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for energyItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "energyItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "energyItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/energy-item-type.jq b/templates/xbrl/utr/energy-item-type.jq new file mode 100644 index 00000000..0258165f --- /dev/null +++ b/templates/xbrl/utr/energy-item-type.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR energy Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for energyItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "energyItemType")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "energyItemType")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/energy-per-monetary-item-type-normative.jq b/templates/xbrl/utr/energy-per-monetary-item-type-normative.jq new file mode 100644 index 00000000..b4c9bea8 --- /dev/null +++ b/templates/xbrl/utr/energy-per-monetary-item-type-normative.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR energy Per Monetary Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for energyPerMonetaryItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "energyPerMonetaryItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "energyPerMonetaryItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/energy-per-monetary-item-type.jq b/templates/xbrl/utr/energy-per-monetary-item-type.jq new file mode 100644 index 00000000..d7de084e --- /dev/null +++ b/templates/xbrl/utr/energy-per-monetary-item-type.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR energy Per Monetary Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for energyPerMonetaryItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "energyPerMonetaryItemType")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "energyPerMonetaryItemType")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/flow-item-type-normative.jq b/templates/xbrl/utr/flow-item-type-normative.jq new file mode 100644 index 00000000..bb32fed1 --- /dev/null +++ b/templates/xbrl/utr/flow-item-type-normative.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR flow Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for flowItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "flowItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "flowItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/flow-item-type.jq b/templates/xbrl/utr/flow-item-type.jq new file mode 100644 index 00000000..deb2ddac --- /dev/null +++ b/templates/xbrl/utr/flow-item-type.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR flow Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for flowItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "flowItemType")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "flowItemType")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/force-item-type-normative.jq b/templates/xbrl/utr/force-item-type-normative.jq new file mode 100644 index 00000000..c99dbcee --- /dev/null +++ b/templates/xbrl/utr/force-item-type-normative.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR force Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for forceItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "forceItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "forceItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/force-item-type.jq b/templates/xbrl/utr/force-item-type.jq new file mode 100644 index 00000000..e41d5918 --- /dev/null +++ b/templates/xbrl/utr/force-item-type.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR force Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for forceItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "forceItemType")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "forceItemType")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/frequency-item-type-normative.jq b/templates/xbrl/utr/frequency-item-type-normative.jq new file mode 100644 index 00000000..86fc608e --- /dev/null +++ b/templates/xbrl/utr/frequency-item-type-normative.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR frequency Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for frequencyItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "frequencyItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "frequencyItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/frequency-item-type.jq b/templates/xbrl/utr/frequency-item-type.jq new file mode 100644 index 00000000..c6188760 --- /dev/null +++ b/templates/xbrl/utr/frequency-item-type.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR frequency Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for frequencyItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "frequencyItemType")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "frequencyItemType")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/ghg-emissions-item-type-normative.jq b/templates/xbrl/utr/ghg-emissions-item-type-normative.jq new file mode 100644 index 00000000..5c46841b --- /dev/null +++ b/templates/xbrl/utr/ghg-emissions-item-type-normative.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR ghg Emissions Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for ghgEmissionsItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "ghgEmissionsItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "ghgEmissionsItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/ghg-emissions-item-type.jq b/templates/xbrl/utr/ghg-emissions-item-type.jq new file mode 100644 index 00000000..f6eb5104 --- /dev/null +++ b/templates/xbrl/utr/ghg-emissions-item-type.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR ghg Emissions Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for ghgEmissionsItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "ghgEmissionsItemType")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "ghgEmissionsItemType")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/ghg-emissions-per-monetary-item-type-normative.jq b/templates/xbrl/utr/ghg-emissions-per-monetary-item-type-normative.jq new file mode 100644 index 00000000..69737d46 --- /dev/null +++ b/templates/xbrl/utr/ghg-emissions-per-monetary-item-type-normative.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR ghg Emissions Per Monetary Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for ghgEmissionsPerMonetaryItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "ghgEmissionsPerMonetaryItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "ghgEmissionsPerMonetaryItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/ghg-emissions-per-monetary-item-type.jq b/templates/xbrl/utr/ghg-emissions-per-monetary-item-type.jq new file mode 100644 index 00000000..91621193 --- /dev/null +++ b/templates/xbrl/utr/ghg-emissions-per-monetary-item-type.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR ghg Emissions Per Monetary Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for ghgEmissionsPerMonetaryItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "ghgEmissionsPerMonetaryItemType")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "ghgEmissionsPerMonetaryItemType")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/length-item-type-normative.jq b/templates/xbrl/utr/length-item-type-normative.jq new file mode 100644 index 00000000..8af679b8 --- /dev/null +++ b/templates/xbrl/utr/length-item-type-normative.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR length Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for lengthItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "lengthItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "lengthItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/length-item-type.jq b/templates/xbrl/utr/length-item-type.jq new file mode 100644 index 00000000..710c83ce --- /dev/null +++ b/templates/xbrl/utr/length-item-type.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR length Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for lengthItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "lengthItemType")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "lengthItemType")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/mass-item-type-normative.jq b/templates/xbrl/utr/mass-item-type-normative.jq new file mode 100644 index 00000000..7f19a2cb --- /dev/null +++ b/templates/xbrl/utr/mass-item-type-normative.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR mass Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for massItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "massItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "massItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/mass-item-type.jq b/templates/xbrl/utr/mass-item-type.jq new file mode 100644 index 00000000..43da32f9 --- /dev/null +++ b/templates/xbrl/utr/mass-item-type.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR mass Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for massItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "massItemType")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "massItemType")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/memory-item-type-normative.jq b/templates/xbrl/utr/memory-item-type-normative.jq new file mode 100644 index 00000000..cffe12ac --- /dev/null +++ b/templates/xbrl/utr/memory-item-type-normative.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR memory Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for memoryItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "memoryItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "memoryItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/memory-item-type.jq b/templates/xbrl/utr/memory-item-type.jq new file mode 100644 index 00000000..cb68d7f7 --- /dev/null +++ b/templates/xbrl/utr/memory-item-type.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR memory Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for memoryItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "memoryItemType")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "memoryItemType")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/monetary-item-type-normative.jq b/templates/xbrl/utr/monetary-item-type-normative.jq new file mode 100644 index 00000000..90f665b6 --- /dev/null +++ b/templates/xbrl/utr/monetary-item-type-normative.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR monetary Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for monetaryItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "monetaryItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "monetaryItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/monetary-item-type.jq b/templates/xbrl/utr/monetary-item-type.jq new file mode 100644 index 00000000..38c979ea --- /dev/null +++ b/templates/xbrl/utr/monetary-item-type.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR monetary Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for monetaryItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "monetaryItemType")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "monetaryItemType")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/per-share-item-type-normative.jq b/templates/xbrl/utr/per-share-item-type-normative.jq new file mode 100644 index 00000000..11e51208 --- /dev/null +++ b/templates/xbrl/utr/per-share-item-type-normative.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR per Share Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for perShareItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "perShareItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "perShareItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/per-share-item-type.jq b/templates/xbrl/utr/per-share-item-type.jq new file mode 100644 index 00000000..1884e560 --- /dev/null +++ b/templates/xbrl/utr/per-share-item-type.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR per Share Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for perShareItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "perShareItemType")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "perShareItemType")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/per-unit-item-type-normative.jq b/templates/xbrl/utr/per-unit-item-type-normative.jq new file mode 100644 index 00000000..9faa2ac7 --- /dev/null +++ b/templates/xbrl/utr/per-unit-item-type-normative.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR per Unit Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for perUnitItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "perUnitItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "perUnitItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/per-unit-item-type.jq b/templates/xbrl/utr/per-unit-item-type.jq new file mode 100644 index 00000000..53eeb7f3 --- /dev/null +++ b/templates/xbrl/utr/per-unit-item-type.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR per Unit Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for perUnitItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "perUnitItemType")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "perUnitItemType")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/plane-angle-item-type-normative.jq b/templates/xbrl/utr/plane-angle-item-type-normative.jq new file mode 100644 index 00000000..3b8cad61 --- /dev/null +++ b/templates/xbrl/utr/plane-angle-item-type-normative.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR plane Angle Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for planeAngleItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "planeAngleItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "planeAngleItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/plane-angle-item-type.jq b/templates/xbrl/utr/plane-angle-item-type.jq new file mode 100644 index 00000000..8a15cb6d --- /dev/null +++ b/templates/xbrl/utr/plane-angle-item-type.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR plane Angle Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for planeAngleItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "planeAngleItemType")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "planeAngleItemType")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/power-item-type-normative.jq b/templates/xbrl/utr/power-item-type-normative.jq new file mode 100644 index 00000000..cac4c536 --- /dev/null +++ b/templates/xbrl/utr/power-item-type-normative.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR power Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for powerItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "powerItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "powerItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/power-item-type.jq b/templates/xbrl/utr/power-item-type.jq new file mode 100644 index 00000000..32d268c3 --- /dev/null +++ b/templates/xbrl/utr/power-item-type.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR power Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for powerItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "powerItemType")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "powerItemType")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/pressure-item-type-normative.jq b/templates/xbrl/utr/pressure-item-type-normative.jq new file mode 100644 index 00000000..fe9333b8 --- /dev/null +++ b/templates/xbrl/utr/pressure-item-type-normative.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR pressure Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for pressureItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "pressureItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "pressureItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/pressure-item-type.jq b/templates/xbrl/utr/pressure-item-type.jq new file mode 100644 index 00000000..4d9fe640 --- /dev/null +++ b/templates/xbrl/utr/pressure-item-type.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR pressure Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for pressureItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "pressureItemType")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "pressureItemType")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/pure-item-type-normative.jq b/templates/xbrl/utr/pure-item-type-normative.jq new file mode 100644 index 00000000..1baa38e9 --- /dev/null +++ b/templates/xbrl/utr/pure-item-type-normative.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR pure Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for pureItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "pureItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "pureItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/pure-item-type.jq b/templates/xbrl/utr/pure-item-type.jq new file mode 100644 index 00000000..31e2e4b1 --- /dev/null +++ b/templates/xbrl/utr/pure-item-type.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR pure Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for pureItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "pureItemType")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "pureItemType")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/shares-item-type-normative.jq b/templates/xbrl/utr/shares-item-type-normative.jq new file mode 100644 index 00000000..3cdefb6e --- /dev/null +++ b/templates/xbrl/utr/shares-item-type-normative.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR shares Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for sharesItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "sharesItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "sharesItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/shares-item-type.jq b/templates/xbrl/utr/shares-item-type.jq new file mode 100644 index 00000000..ba37db08 --- /dev/null +++ b/templates/xbrl/utr/shares-item-type.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR shares Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for sharesItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "sharesItemType")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "sharesItemType")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/temperature-item-type-normative.jq b/templates/xbrl/utr/temperature-item-type-normative.jq new file mode 100644 index 00000000..bb217bbc --- /dev/null +++ b/templates/xbrl/utr/temperature-item-type-normative.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR temperature Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for temperatureItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "temperatureItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "temperatureItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/temperature-item-type.jq b/templates/xbrl/utr/temperature-item-type.jq new file mode 100644 index 00000000..514ec16e --- /dev/null +++ b/templates/xbrl/utr/temperature-item-type.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR temperature Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for temperatureItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "temperatureItemType")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "temperatureItemType")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/voltage-item-type-normative.jq b/templates/xbrl/utr/voltage-item-type-normative.jq new file mode 100644 index 00000000..ed89f64a --- /dev/null +++ b/templates/xbrl/utr/voltage-item-type-normative.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR voltage Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for voltageItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "voltageItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "voltageItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/voltage-item-type.jq b/templates/xbrl/utr/voltage-item-type.jq new file mode 100644 index 00000000..37fbb700 --- /dev/null +++ b/templates/xbrl/utr/voltage-item-type.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR voltage Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for voltageItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "voltageItemType")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "voltageItemType")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/volume-item-type-normative.jq b/templates/xbrl/utr/volume-item-type-normative.jq new file mode 100644 index 00000000..8df4aae1 --- /dev/null +++ b/templates/xbrl/utr/volume-item-type-normative.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR volume Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for volumeItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "volumeItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "volumeItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/volume-item-type.jq b/templates/xbrl/utr/volume-item-type.jq new file mode 100644 index 00000000..1ff15a63 --- /dev/null +++ b/templates/xbrl/utr/volume-item-type.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR volume Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for volumeItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "volumeItemType")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "volumeItemType")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/volume-per-monetary-item-type-normative.jq b/templates/xbrl/utr/volume-per-monetary-item-type-normative.jq new file mode 100644 index 00000000..25a53029 --- /dev/null +++ b/templates/xbrl/utr/volume-per-monetary-item-type-normative.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR volume Per Monetary Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for volumePerMonetaryItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "volumePerMonetaryItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "volumePerMonetaryItemType" and .["{http://www.xbrl.org/2009/utr}status"] == "REC")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +} diff --git a/templates/xbrl/utr/volume-per-monetary-item-type.jq b/templates/xbrl/utr/volume-per-monetary-item-type.jq new file mode 100644 index 00000000..9daeb5ae --- /dev/null +++ b/templates/xbrl/utr/volume-per-monetary-item-type.jq @@ -0,0 +1,31 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": ("XBRL UTR volume Per Monetary Item Type units (" + .["{http://www.xbrl.org/2009/utr}utr"]["@attributes"].lastUpdated + ")"), + "description": "Valid units for volumePerMonetaryItemType as defined in the XBRL Units Type Registry", + "examples": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "volumePerMonetaryItemType")) + + | .[0:3] + | map(.["{http://www.xbrl.org/2009/utr}unitId"]) + ), + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/specification/utr/rec-2013-11-18/utr-rec-2013-11-18-clean.html", + "https://www.xbrl.org/utr/utr.xml" + ], + "anyOf": ( + .["{http://www.xbrl.org/2009/utr}utr"]["{http://www.xbrl.org/2009/utr}units"]["{http://www.xbrl.org/2009/utr}unit"] + | map(select(.["{http://www.xbrl.org/2009/utr}itemType"] == "volumePerMonetaryItemType")) + + | map( + { + "const": .["{http://www.xbrl.org/2009/utr}unitId"], + "title": .["{http://www.xbrl.org/2009/utr}unitName"], + "description": (.["{http://www.xbrl.org/2009/utr}definition"] | gsub("\\s{2,}"; " ") | if endswith(".") then .[:-1] else . end) + } + + (if .["{http://www.xbrl.org/2009/utr}symbol"] then {"x-symbol": .["{http://www.xbrl.org/2009/utr}symbol"]} else {} end) + + (if .["{http://www.xbrl.org/2009/utr}status"] then {"x-status": .["{http://www.xbrl.org/2009/utr}status"]} else {} end) + ) + ) +}