{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://xbrl-forge.org/schema/input/reports/applied-tag",
    "title": "Applied Tag",
    "description": "Tag applied to a piece of information. In case of multiple usages of NON-NUMERIC (see type below) concepts with the same context, continuations will be handled automatically.",
    "type": "object",
    "required": [
        "name",
        "attributes",
        "entity",
        "entity_scheme",
        "end_date"
    ],
    "properties": {
        "namespace": {
            "description": "The namespace of the concept (line item) used for the tag. In case of an element from the taxonomy created by this json, omit the namespace attribute.",
            "type": "string"
        },
        "name": {
            "description": "The name of the concept (line item) used for the tag.",
            "type": "string"
        },
        "attributes": {
            "description": "Each tag is enhances by attributes, depending on their type",
            "type": "object",
            "properties": {
                "format": {
                    "description": "NUMERIC and NONNUMERIC: The format of the information decribing how it should be transformed for the mashine. For this normally transformation registries are used. The namespace must be defined with a prefix in the namespaces object of the resource.",
                    "$ref": "https://xbrl-forge.org/schema/input/general/xml-element"
                },
                "nil": {
                    "description": "NUMERIC and NONNUMERIC: Sets the xsi:nil property on facts.",
                    "type": "boolean"
                },
                "escape": {
                    "description": "NONNUMERIC: caping includes xhtml strucural elements into the fact value for nonnumeric tags. Only the escaping flag from the first ocurrance of a concept for each context will read this attribute and then apply to all continuations for that fact.",
                    "type": "boolean"
                },
                "enumeration_values": {
                    "description": "NONNUMERIC: The values for Enumeration and Enumeration Sets.",
                    "type": "array",
                    "items": {
                        "description": "One enum value",
                        "$ref": "https://xbrl-forge.org/schema/input/general/xml-element"
                    }
                },
                "continuation_correlation_id": {
                    "description": "NONNUMERIC: By default all nonnumerics of the same concept and context get continuated automatically. To break this behaviour, other continuation chains or duplicate facts can be achieved by setting a value here. All tags with the same value, context and concept will be merged seperatly to continuation chains. If this key is not set or null, it will be merged with all other facts of same concept and context with non-setted key.",
                    "type": "string"
                },
                "decimals": {
                    "description": "NUMERIC: Decimals declare the accuracy of the tagged value.",
                    "type": "number"
                },
                "scale": {
                    "description": "NUMERIC: Scale declare the scale of the tagged value, VALUE*10^scale",
                    "type": "number"
                },
                "unit": {
                    "description": "CHECK IF NUMERIC: The unit to be used. Omit if not nummeric tag. This will determine if it is numeric or not.",
                    "$ref": "https://xbrl-forge.org/schema/input/reports/unit"
                },
                "sign": {
                    "description": "NUMERIC: The sign attribute reverses the mashine readable value, which is by default always positive. This is necessary if the human readable logic differs from the xbrl logic in regards to the used concept.",
                    "type": "boolean"
                }
            }
        },
        "entity": {
            "description": "The Entity Identifier the fact refers to",
            "type": "string"
        },
        "entity_scheme": {
            "description": "The Schema of the Entity Identifier",
            "type": "string"
        },
        "end_date": {
            "description": "The Date must be provided in YYYY-MM-DD format. The end date is always required and refers to the end of the given day.",
            "type": "string",
            "format": "date"
        },
        "start_date": {
            "description": "The start date is only to be used for duration concepts. This date must be provided in YYYY-MM-DD format and always refers to the start of the given day.",
            "type": ["string", "null"],
            "format": "date"
        },
        "dimensions": {
            "description": "Zero to N dimensions can be provided. Every axis must only be used once per fact. Omit Default members of axis.",
            "type": "array",
            "items": {
                "$ref": "https://xbrl-forge.org/schema/input/reports/dimension"
            },
            "minItems": 0
        },
        "start_index": {
            "description": "start_index and end_index define the applicable content for this tag. If both are omitted, the tag will be applied to the whole structue including the structural elements. If provided, the indexes will count in characters of the content, indexed beginning with 0. The end index is the index of the character after the last character which is to be tagged.",
            "type": [
                "number",
                "null"
            ]
        },
        "end_index": {
            "description": "start_index and end_index define the applicable content for this tag. If both are omitted, the tag will be applied to the whole structue including the structural elements. If provided, the indexes will count in characters of the content, indexed beginning with 0 (-1 for the end). The end index is the index of the character after the last character which is to be tagged..",
            "type": [
                "number",
                "null"
            ]
        }
    }
}