diff --git a/README.markdown b/README.markdown index bde5b66c..e7cae46c 100644 --- a/README.markdown +++ b/README.markdown @@ -77,6 +77,7 @@ expressed as JSON Schema definitions. | JSON-RPC | [JSON-RPC 2.0](https://www.jsonrpc.org/specification) | JSON-RPC 2.0 Specification | | JSON Schema | [Draft 2020-12](https://json-schema.org/draft/2020-12/json-schema-core) | JSON Schema: A Media Type for Describing JSON Documents | | W3C | [XML Schema Part 2](https://www.w3.org/TR/xmlschema-2/) | XML Schema Datatypes Second Edition | +| XBRL International | [XBRL 2.1](https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html) | Extensible Business Reporting Language (XBRL) 2.1 | To request coverage of another standard, please [open an issue on GitHub](https://github.com/sourcemeta/std/issues). diff --git a/schemas/xbrl/instance/2003/any-uri-item-type.json b/schemas/xbrl/instance/2003/any-uri-item-type.json new file mode 100644 index 00000000..c5cb995d --- /dev/null +++ b/schemas/xbrl/instance/2003/any-uri-item-type.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL anyURIItemType", + "description": "XBRL item type for Uniform Resource Identifiers (URIs). Based on W3C XML Schema anyURI", + "examples": [ + "https://example.com", + "http://test.org/path", + "urn:isbn:0-486-27557-4" + ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/any-uri.json" +} diff --git a/schemas/xbrl/instance/2003/base64-binary-item-type.json b/schemas/xbrl/instance/2003/base64-binary-item-type.json new file mode 100644 index 00000000..c1949c3c --- /dev/null +++ b/schemas/xbrl/instance/2003/base64-binary-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL base64BinaryItemType", + "description": "XBRL item type for Base64-encoded binary data. Based on W3C XML Schema base64Binary", + "examples": [ "SGVsbG8=", "V29ybGQ=", "VGVzdA==" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/base64-binary.json" +} diff --git a/schemas/xbrl/instance/2003/boolean-item-type.json b/schemas/xbrl/instance/2003/boolean-item-type.json new file mode 100644 index 00000000..ed1a9c0a --- /dev/null +++ b/schemas/xbrl/instance/2003/boolean-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL booleanItemType", + "description": "XBRL item type for boolean values (true or false). Based on W3C XML Schema boolean", + "examples": [ true, false, true ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/boolean.json" +} diff --git a/schemas/xbrl/instance/2003/byte-item-type.json b/schemas/xbrl/instance/2003/byte-item-type.json new file mode 100644 index 00000000..3df04c46 --- /dev/null +++ b/schemas/xbrl/instance/2003/byte-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL byteItemType", + "description": "XBRL item type for signed 8-bit integers. Based on W3C XML Schema byte", + "examples": [ 42, -100, 0 ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/byte.json" +} diff --git a/schemas/xbrl/instance/2003/date-item-type.json b/schemas/xbrl/instance/2003/date-item-type.json new file mode 100644 index 00000000..e7430507 --- /dev/null +++ b/schemas/xbrl/instance/2003/date-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL dateItemType", + "description": "XBRL item type for calendar dates. Based on W3C XML Schema date", + "examples": [ "2002-10-10", "2002-10-10Z", "2002-10-10+13:00" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/date.json" +} diff --git a/schemas/xbrl/instance/2003/date-time-item-type.json b/schemas/xbrl/instance/2003/date-time-item-type.json new file mode 100644 index 00000000..db5edf1a --- /dev/null +++ b/schemas/xbrl/instance/2003/date-time-item-type.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL dateTimeItemType", + "description": "XBRL item type for dates or date-time values. Union of W3C XML Schema date and dateTime types", + "examples": [ + "2002-10-10", + "2002-10-10T12:00:00-05:00", + "2002-10-10Z", + "2002-05-30T09:00:00" + ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "anyOf": [ + { + "$ref": "../../../w3c/xmlschema/2001/date.json" + }, + { + "$ref": "../../../w3c/xmlschema/2001/date-time.json" + } + ] +} diff --git a/schemas/xbrl/instance/2003/decimal-item-type.json b/schemas/xbrl/instance/2003/decimal-item-type.json new file mode 100644 index 00000000..dca4fcbc --- /dev/null +++ b/schemas/xbrl/instance/2003/decimal-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL decimalItemType", + "description": "XBRL item type for decimal values. Based on W3C XML Schema decimal", + "examples": [ "123.45", "-67.89", "0.0" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/decimal.json" +} diff --git a/schemas/xbrl/instance/2003/double-item-type.json b/schemas/xbrl/instance/2003/double-item-type.json new file mode 100644 index 00000000..3e4cbcf2 --- /dev/null +++ b/schemas/xbrl/instance/2003/double-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL doubleItemType", + "description": "XBRL item type for double-precision 64-bit floating point numbers. Based on W3C XML Schema double", + "examples": [ 123.45, -67.89, 0.0 ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/double.json" +} diff --git a/schemas/xbrl/instance/2003/duration-item-type.json b/schemas/xbrl/instance/2003/duration-item-type.json new file mode 100644 index 00000000..3a5796fc --- /dev/null +++ b/schemas/xbrl/instance/2003/duration-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL durationItemType", + "description": "XBRL item type for time durations. Based on W3C XML Schema duration", + "examples": [ "P1Y2M3DT10H30M", "P3Y6M4DT12H30M5S", "-P120D" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/duration.json" +} diff --git a/schemas/xbrl/instance/2003/float-item-type.json b/schemas/xbrl/instance/2003/float-item-type.json new file mode 100644 index 00000000..6b43269c --- /dev/null +++ b/schemas/xbrl/instance/2003/float-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL floatItemType", + "description": "XBRL item type for single-precision 32-bit floating point numbers. Based on W3C XML Schema float", + "examples": [ 123.45, -67.89, 0.0 ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/float.json" +} diff --git a/schemas/xbrl/instance/2003/fraction-item-type.json b/schemas/xbrl/instance/2003/fraction-item-type.json new file mode 100644 index 00000000..e7a78b37 --- /dev/null +++ b/schemas/xbrl/instance/2003/fraction-item-type.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL fractionItemType", + "description": "XBRL item type for fractional values with explicit numerator and denominator. Represented as a two-element array of W3C XML Schema decimal values", + "examples": [ + [ "1.5", "2" ], + [ "-100", "3.5" ], + [ "5", "-2.5" ], + [ "0", "1" ] + ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "type": "array", + "maxItems": 2, + "minItems": 2, + "prefixItems": [ + { + "$ref": "../../../w3c/xmlschema/2001/decimal.json" + }, + { + "$ref": "../../../w3c/xmlschema/2001/decimal.json", + "not": { + "pattern": "^-?0+(\\.0+)?$" + } + } + ] +} diff --git a/schemas/xbrl/instance/2003/g-day-item-type.json b/schemas/xbrl/instance/2003/g-day-item-type.json new file mode 100644 index 00000000..fd919a10 --- /dev/null +++ b/schemas/xbrl/instance/2003/g-day-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL gDayItemType", + "description": "XBRL item type for recurring Gregorian calendar days. Based on W3C XML Schema gDay", + "examples": [ "---01", "---15", "---31" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/g-day.json" +} diff --git a/schemas/xbrl/instance/2003/g-month-day-item-type.json b/schemas/xbrl/instance/2003/g-month-day-item-type.json new file mode 100644 index 00000000..c03a412a --- /dev/null +++ b/schemas/xbrl/instance/2003/g-month-day-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL gMonthDayItemType", + "description": "XBRL item type for recurring Gregorian calendar month-day combinations. Based on W3C XML Schema gMonthDay", + "examples": [ "--01-15", "--12-25", "--07-04" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/g-month-day.json" +} diff --git a/schemas/xbrl/instance/2003/g-month-item-type.json b/schemas/xbrl/instance/2003/g-month-item-type.json new file mode 100644 index 00000000..e1bbd773 --- /dev/null +++ b/schemas/xbrl/instance/2003/g-month-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL gMonthItemType", + "description": "XBRL item type for Gregorian calendar months. Based on W3C XML Schema gMonth", + "examples": [ "--01", "--06", "--12" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/g-month.json" +} diff --git a/schemas/xbrl/instance/2003/g-year-item-type.json b/schemas/xbrl/instance/2003/g-year-item-type.json new file mode 100644 index 00000000..ce0cedba --- /dev/null +++ b/schemas/xbrl/instance/2003/g-year-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL gYearItemType", + "description": "XBRL item type for Gregorian calendar years. Based on W3C XML Schema gYear", + "examples": [ "2023", "1999", "2024" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/g-year.json" +} diff --git a/schemas/xbrl/instance/2003/g-year-month-item-type.json b/schemas/xbrl/instance/2003/g-year-month-item-type.json new file mode 100644 index 00000000..065f9b60 --- /dev/null +++ b/schemas/xbrl/instance/2003/g-year-month-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL gYearMonthItemType", + "description": "XBRL item type for Gregorian calendar year-month combinations. Based on W3C XML Schema gYearMonth", + "examples": [ "2023-01", "1999-12", "2024-06" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/g-year-month.json" +} diff --git a/schemas/xbrl/instance/2003/hex-binary-item-type.json b/schemas/xbrl/instance/2003/hex-binary-item-type.json new file mode 100644 index 00000000..33f54d82 --- /dev/null +++ b/schemas/xbrl/instance/2003/hex-binary-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL hexBinaryItemType", + "description": "XBRL item type for hexadecimal-encoded binary data. Based on W3C XML Schema hexBinary", + "examples": [ "48656C6C6F", "DEADBEEF", "0123456789ABCDEF" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/hex-binary.json" +} diff --git a/schemas/xbrl/instance/2003/int-item-type.json b/schemas/xbrl/instance/2003/int-item-type.json new file mode 100644 index 00000000..1bfbd54e --- /dev/null +++ b/schemas/xbrl/instance/2003/int-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL intItemType", + "description": "XBRL item type for signed 32-bit integers. Based on W3C XML Schema int", + "examples": [ 42, -100, 0 ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/int.json" +} diff --git a/schemas/xbrl/instance/2003/integer-item-type.json b/schemas/xbrl/instance/2003/integer-item-type.json new file mode 100644 index 00000000..28bc576b --- /dev/null +++ b/schemas/xbrl/instance/2003/integer-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL integerItemType", + "description": "XBRL item type for arbitrary-precision signed integers. Based on W3C XML Schema integer", + "examples": [ "42", "-100", "0" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/integer.json" +} diff --git a/schemas/xbrl/instance/2003/language-item-type.json b/schemas/xbrl/instance/2003/language-item-type.json new file mode 100644 index 00000000..126576b9 --- /dev/null +++ b/schemas/xbrl/instance/2003/language-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL languageItemType", + "description": "Non-numeric item type based on the XML Schema built-in types that are derived by restriction and/or list from string", + "examples": [ "en", "en-US", "fr-CA" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/language.json" +} diff --git a/schemas/xbrl/instance/2003/long-item-type.json b/schemas/xbrl/instance/2003/long-item-type.json new file mode 100644 index 00000000..711a0245 --- /dev/null +++ b/schemas/xbrl/instance/2003/long-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL longItemType", + "description": "XBRL item type for signed 64-bit integers. Based on W3C XML Schema long", + "examples": [ 42, -100, 0 ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/long.json" +} diff --git a/schemas/xbrl/instance/2003/monetary-item-type.json b/schemas/xbrl/instance/2003/monetary-item-type.json new file mode 100644 index 00000000..1d92dcd8 --- /dev/null +++ b/schemas/xbrl/instance/2003/monetary-item-type.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL monetaryItemType", + "description": "The monetary type serves as the datatype for those financial concepts in a taxonomy which denote units in a currency", + "examples": [ + { + "value": "100.50", + "currency": "USD" + }, + { + "value": "-25.00", + "currency": "EUR" + }, + { + "value": "0", + "currency": "GBP" + } + ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "type": "object", + "required": [ "value", "currency" ], + "properties": { + "value": { + "$ref": "../../../w3c/xmlschema/2001/decimal.json" + }, + "currency": { + "$ref": "../../../iso/currency/2015/alpha-currency.json" + } + } +} diff --git a/schemas/xbrl/instance/2003/name-item-type.json b/schemas/xbrl/instance/2003/name-item-type.json new file mode 100644 index 00000000..33421b7d --- /dev/null +++ b/schemas/xbrl/instance/2003/name-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL NameItemType", + "description": "Non-numeric item type based on the XML Schema built-in types that are derived by restriction and/or list from string", + "examples": [ "Name1", "element-name", "my:name" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/name.json" +} diff --git a/schemas/xbrl/instance/2003/ncname-item-type.json b/schemas/xbrl/instance/2003/ncname-item-type.json new file mode 100644 index 00000000..6c15194b --- /dev/null +++ b/schemas/xbrl/instance/2003/ncname-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL NCNameItemType", + "description": "Non-numeric item type based on the XML Schema built-in types that are derived by restriction and/or list from string", + "examples": [ "elementName", "attribute1", "localName" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/ncname.json" +} diff --git a/schemas/xbrl/instance/2003/negative-integer-item-type.json b/schemas/xbrl/instance/2003/negative-integer-item-type.json new file mode 100644 index 00000000..80bf7d04 --- /dev/null +++ b/schemas/xbrl/instance/2003/negative-integer-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL negativeIntegerItemType", + "description": "XBRL item type for arbitrary-precision negative integers (less than zero). Based on W3C XML Schema negativeInteger", + "examples": [ "-42", "-100", "-1" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/negative-integer.json" +} diff --git a/schemas/xbrl/instance/2003/non-negative-integer-item-type.json b/schemas/xbrl/instance/2003/non-negative-integer-item-type.json new file mode 100644 index 00000000..223a6205 --- /dev/null +++ b/schemas/xbrl/instance/2003/non-negative-integer-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL nonNegativeIntegerItemType", + "description": "XBRL item type for arbitrary-precision non-negative integers (zero or positive). Based on W3C XML Schema nonNegativeInteger", + "examples": [ "42", "100", "1" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/non-negative-integer.json" +} diff --git a/schemas/xbrl/instance/2003/non-positive-integer-item-type.json b/schemas/xbrl/instance/2003/non-positive-integer-item-type.json new file mode 100644 index 00000000..ff330a81 --- /dev/null +++ b/schemas/xbrl/instance/2003/non-positive-integer-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL nonPositiveIntegerItemType", + "description": "XBRL item type for arbitrary-precision non-positive integers (zero or negative). Based on W3C XML Schema nonPositiveInteger", + "examples": [ "-42", "-100", "0" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/non-positive-integer.json" +} diff --git a/schemas/xbrl/instance/2003/normalized-string-item-type.json b/schemas/xbrl/instance/2003/normalized-string-item-type.json new file mode 100644 index 00000000..1b82a09a --- /dev/null +++ b/schemas/xbrl/instance/2003/normalized-string-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL normalizedStringItemType", + "description": "Non-numeric item type based on the XML Schema built-in types that are derived by restriction and/or list from string", + "examples": [ "Normalized text", "Another example", "Third item" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/normalized-string.json" +} diff --git a/schemas/xbrl/instance/2003/positive-integer-item-type.json b/schemas/xbrl/instance/2003/positive-integer-item-type.json new file mode 100644 index 00000000..8fdc1ac0 --- /dev/null +++ b/schemas/xbrl/instance/2003/positive-integer-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL positiveIntegerItemType", + "description": "XBRL item type for arbitrary-precision positive integers (greater than zero). Based on W3C XML Schema positiveInteger", + "examples": [ "42", "100", "1" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/positive-integer.json" +} diff --git a/schemas/xbrl/instance/2003/pure-item-type.json b/schemas/xbrl/instance/2003/pure-item-type.json new file mode 100644 index 00000000..ffc60293 --- /dev/null +++ b/schemas/xbrl/instance/2003/pure-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL pureItemType", + "description": "This datatype serves as the type for dimensionless numbers such as percentage change, growth rates, and other ratios where the numerator and denominator have the same units. Based on W3C XML Schema decimal", + "examples": [ "100.50", "-25.00", "0" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/decimal.json" +} diff --git a/schemas/xbrl/instance/2003/qname-item-type.json b/schemas/xbrl/instance/2003/qname-item-type.json new file mode 100644 index 00000000..52619ee6 --- /dev/null +++ b/schemas/xbrl/instance/2003/qname-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL QNameItemType", + "description": "XBRL item type for XML qualified names (QNames). Based on W3C XML Schema QName", + "examples": [ "prefix:localName", "xsd:string", "my:element" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/qname.json" +} diff --git a/schemas/xbrl/instance/2003/shares-item-type.json b/schemas/xbrl/instance/2003/shares-item-type.json new file mode 100644 index 00000000..e3435e1a --- /dev/null +++ b/schemas/xbrl/instance/2003/shares-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL sharesItemType", + "description": "This datatype serves as the datatype for share based financial concepts. Based on W3C XML Schema decimal", + "examples": [ "100.50", "-25.00", "0" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/decimal.json" +} diff --git a/schemas/xbrl/instance/2003/short-item-type.json b/schemas/xbrl/instance/2003/short-item-type.json new file mode 100644 index 00000000..9a5e7b1f --- /dev/null +++ b/schemas/xbrl/instance/2003/short-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL shortItemType", + "description": "XBRL item type for signed 16-bit integers. Based on W3C XML Schema short", + "examples": [ 42, -100, 0 ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/short.json" +} diff --git a/schemas/xbrl/instance/2003/string-item-type.json b/schemas/xbrl/instance/2003/string-item-type.json new file mode 100644 index 00000000..4a8e5ef7 --- /dev/null +++ b/schemas/xbrl/instance/2003/string-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL stringItemType", + "description": "XBRL item type for character strings. Based on W3C XML Schema string", + "examples": [ "Example text", "Another string", "Third example" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/string.json" +} diff --git a/schemas/xbrl/instance/2003/time-item-type.json b/schemas/xbrl/instance/2003/time-item-type.json new file mode 100644 index 00000000..9734d3ac --- /dev/null +++ b/schemas/xbrl/instance/2003/time-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL timeItemType", + "description": "XBRL item type for time values. Based on W3C XML Schema time", + "examples": [ "13:20:00", "13:20:30.5555", "13:20:00-05:00" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/time.json" +} diff --git a/schemas/xbrl/instance/2003/token-item-type.json b/schemas/xbrl/instance/2003/token-item-type.json new file mode 100644 index 00000000..7aea6f91 --- /dev/null +++ b/schemas/xbrl/instance/2003/token-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL tokenItemType", + "description": "Non-numeric item type based on the XML Schema built-in types that are derived by restriction and/or list from string", + "examples": [ "token1", "another-token", "example_token" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/token.json" +} diff --git a/schemas/xbrl/instance/2003/unsigned-byte-item-type.json b/schemas/xbrl/instance/2003/unsigned-byte-item-type.json new file mode 100644 index 00000000..3f8fd9f6 --- /dev/null +++ b/schemas/xbrl/instance/2003/unsigned-byte-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL unsignedByteItemType", + "description": "XBRL item type for unsigned 8-bit integers. Based on W3C XML Schema unsignedByte", + "examples": [ 42, 100, 1 ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/unsigned-byte.json" +} diff --git a/schemas/xbrl/instance/2003/unsigned-int-item-type.json b/schemas/xbrl/instance/2003/unsigned-int-item-type.json new file mode 100644 index 00000000..1b354119 --- /dev/null +++ b/schemas/xbrl/instance/2003/unsigned-int-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL unsignedIntItemType", + "description": "XBRL item type for unsigned 32-bit integers. Based on W3C XML Schema unsignedInt", + "examples": [ 42, 100, 1 ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/unsigned-int.json" +} diff --git a/schemas/xbrl/instance/2003/unsigned-long-item-type.json b/schemas/xbrl/instance/2003/unsigned-long-item-type.json new file mode 100644 index 00000000..39bf9af2 --- /dev/null +++ b/schemas/xbrl/instance/2003/unsigned-long-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL unsignedLongItemType", + "description": "XBRL item type for arbitrary-precision unsigned 64-bit integers. Based on W3C XML Schema unsignedLong", + "examples": [ "42", "100", "1" ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/unsigned-long.json" +} diff --git a/schemas/xbrl/instance/2003/unsigned-short-item-type.json b/schemas/xbrl/instance/2003/unsigned-short-item-type.json new file mode 100644 index 00000000..fc045696 --- /dev/null +++ b/schemas/xbrl/instance/2003/unsigned-short-item-type.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "XBRL unsignedShortItemType", + "description": "XBRL item type for unsigned 16-bit integers. Based on W3C XML Schema unsignedShort", + "examples": [ 42, 100, 1 ], + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "x-links": [ + "https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_5.1.1.3", + "https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd" + ], + "$ref": "../../../w3c/xmlschema/2001/unsigned-short.json" +} diff --git a/test/xbrl/instance/2003/any-uri-item-type.test.json b/test/xbrl/instance/2003/any-uri-item-type.test.json new file mode 100644 index 00000000..64782363 --- /dev/null +++ b/test/xbrl/instance/2003/any-uri-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/any-uri-item-type.json", + "tests": [ + { + "description": "Valid - http URL", + "data": "http://example.com", + "valid": true + }, + { + "description": "Valid - https URL", + "data": "https://example.com/path?query=value", + "valid": true + }, + { + "description": "Valid - relative URI", + "data": "../path/to/resource", + "valid": true + }, + { + "description": "Valid - empty string", + "data": "", + "valid": true + }, + { + "description": "Invalid - URI with spaces", + "data": "http://example.com/path with spaces", + "valid": false + }, + { + "description": "Invalid - number instead of string", + "data": 123, + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/base64-binary-item-type.test.json b/test/xbrl/instance/2003/base64-binary-item-type.test.json new file mode 100644 index 00000000..9a791b81 --- /dev/null +++ b/test/xbrl/instance/2003/base64-binary-item-type.test.json @@ -0,0 +1,41 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/base64-binary-item-type.json", + "tests": [ + { + "description": "Valid - base64 encoded string", + "data": "SGVsbG8gV29ybGQ=", + "valid": true + }, + { + "description": "Valid - base64 with double padding", + "data": "YQ==", + "valid": true + }, + { + "description": "Valid - empty string", + "data": "", + "valid": true + }, + { + "description": "Valid - longer base64 string", + "data": "VGhpcyBpcyBhIHRlc3Q=", + "valid": true + }, + { + "description": "Invalid - invalid base64 characters", + "data": "Hello@World", + "valid": false + }, + { + "description": "Invalid - improper padding", + "data": "SGVsbG8", + "valid": false + }, + { + "description": "Invalid - number instead of string", + "data": 123, + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/boolean-item-type.test.json b/test/xbrl/instance/2003/boolean-item-type.test.json new file mode 100644 index 00000000..aa228d84 --- /dev/null +++ b/test/xbrl/instance/2003/boolean-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/boolean-item-type.json", + "tests": [ + { + "description": "Valid - true", + "data": true, + "valid": true + }, + { + "description": "Valid - false", + "data": false, + "valid": true + }, + { + "description": "Invalid - string 'true'", + "data": "true", + "valid": false + }, + { + "description": "Invalid - string 'false'", + "data": "false", + "valid": false + }, + { + "description": "Invalid - number 1", + "data": 1, + "valid": false + }, + { + "description": "Invalid - number 0", + "data": 0, + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/byte-item-type.test.json b/test/xbrl/instance/2003/byte-item-type.test.json new file mode 100644 index 00000000..4a8caaee --- /dev/null +++ b/test/xbrl/instance/2003/byte-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/byte-item-type.json", + "tests": [ + { + "description": "Valid - positive byte", + "data": 42, + "valid": true + }, + { + "description": "Valid - negative byte", + "data": -10, + "valid": true + }, + { + "description": "Valid - zero", + "data": 0, + "valid": true + }, + { + "description": "Invalid - string instead of number", + "data": "42", + "valid": false + }, + { + "description": "Invalid - decimal value", + "data": 4.2, + "valid": false + }, + { + "description": "Invalid - non-numeric string", + "data": "abc", + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/date-item-type.test.json b/test/xbrl/instance/2003/date-item-type.test.json new file mode 100644 index 00000000..70c4f739 --- /dev/null +++ b/test/xbrl/instance/2003/date-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/date-item-type.json", + "tests": [ + { + "description": "Valid - basic date", + "data": "2023-10-15", + "valid": true + }, + { + "description": "Valid - date with timezone", + "data": "2023-10-15Z", + "valid": true + }, + { + "description": "Valid - date with offset", + "data": "2023-10-15-05:00", + "valid": true + }, + { + "description": "Valid - negative year", + "data": "-0001-01-01", + "valid": true + }, + { + "description": "Invalid - invalid month", + "data": "2023-13-01", + "valid": false + }, + { + "description": "Invalid - random string", + "data": "not-a-date", + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/date-time-item-type.test.json b/test/xbrl/instance/2003/date-time-item-type.test.json new file mode 100644 index 00000000..d1665e4d --- /dev/null +++ b/test/xbrl/instance/2003/date-time-item-type.test.json @@ -0,0 +1,46 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/date-time-item-type.json", + "tests": [ + { + "description": "Valid - date format", + "data": "2002-10-10", + "valid": true + }, + { + "description": "Valid - dateTime with timezone offset", + "data": "2002-10-10T12:00:00-05:00", + "valid": true + }, + { + "description": "Valid - date with Z timezone", + "data": "2002-10-10Z", + "valid": true + }, + { + "description": "Valid - dateTime without timezone", + "data": "2002-05-30T09:00:00", + "valid": true + }, + { + "description": "Valid - dateTime with Z timezone", + "data": "2023-01-15T14:30:00Z", + "valid": true + }, + { + "description": "Invalid - invalid month", + "data": "2002-13-10", + "valid": false + }, + { + "description": "Invalid - random string", + "data": "not-a-date-or-time", + "valid": false + }, + { + "description": "Invalid - number instead of string", + "data": 20021010, + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/decimal-item-type.test.json b/test/xbrl/instance/2003/decimal-item-type.test.json new file mode 100644 index 00000000..5f93a9df --- /dev/null +++ b/test/xbrl/instance/2003/decimal-item-type.test.json @@ -0,0 +1,41 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/decimal-item-type.json", + "tests": [ + { + "description": "Valid - positive decimal", + "data": "123.45", + "valid": true + }, + { + "description": "Valid - negative decimal", + "data": "-67.89", + "valid": true + }, + { + "description": "Valid - zero", + "data": "0", + "valid": true + }, + { + "description": "Valid - high precision decimal", + "data": "3.141592653589793", + "valid": true + }, + { + "description": "Invalid - not a decimal string", + "data": "abc", + "valid": false + }, + { + "description": "Invalid - empty string", + "data": "", + "valid": false + }, + { + "description": "Invalid - number type instead of string", + "data": 123.45, + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/double-item-type.test.json b/test/xbrl/instance/2003/double-item-type.test.json new file mode 100644 index 00000000..aef2774d --- /dev/null +++ b/test/xbrl/instance/2003/double-item-type.test.json @@ -0,0 +1,41 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/double-item-type.json", + "tests": [ + { + "description": "Valid - positive double", + "data": 123.45, + "valid": true + }, + { + "description": "Valid - negative double", + "data": -67.89, + "valid": true + }, + { + "description": "Valid - zero", + "data": 0.0, + "valid": true + }, + { + "description": "Valid - integer as double", + "data": 42, + "valid": true + }, + { + "description": "Invalid - string instead of number", + "data": "123.45", + "valid": false + }, + { + "description": "Invalid - non-numeric string", + "data": "abc", + "valid": false + }, + { + "description": "Invalid - null", + "data": null, + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/duration-item-type.test.json b/test/xbrl/instance/2003/duration-item-type.test.json new file mode 100644 index 00000000..89214968 --- /dev/null +++ b/test/xbrl/instance/2003/duration-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/duration-item-type.json", + "tests": [ + { + "description": "Valid - duration in days", + "data": "P1D", + "valid": true + }, + { + "description": "Valid - duration in years and months", + "data": "P1Y2M", + "valid": true + }, + { + "description": "Valid - duration with time component", + "data": "PT5H30M", + "valid": true + }, + { + "description": "Valid - negative duration", + "data": "-P1D", + "valid": true + }, + { + "description": "Invalid - missing P prefix", + "data": "1D", + "valid": false + }, + { + "description": "Invalid - random string", + "data": "not-a-duration", + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/float-item-type.test.json b/test/xbrl/instance/2003/float-item-type.test.json new file mode 100644 index 00000000..6cbc8f69 --- /dev/null +++ b/test/xbrl/instance/2003/float-item-type.test.json @@ -0,0 +1,41 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/float-item-type.json", + "tests": [ + { + "description": "Valid - positive float", + "data": 123.45, + "valid": true + }, + { + "description": "Valid - negative float", + "data": -67.89, + "valid": true + }, + { + "description": "Valid - zero", + "data": 0.0, + "valid": true + }, + { + "description": "Valid - integer as float", + "data": 42, + "valid": true + }, + { + "description": "Invalid - string instead of number", + "data": "123.45", + "valid": false + }, + { + "description": "Invalid - non-numeric string", + "data": "abc", + "valid": false + }, + { + "description": "Invalid - null", + "data": null, + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/fraction-item-type.test.json b/test/xbrl/instance/2003/fraction-item-type.test.json new file mode 100644 index 00000000..0288c9f3 --- /dev/null +++ b/test/xbrl/instance/2003/fraction-item-type.test.json @@ -0,0 +1,141 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/fraction-item-type.json", + "tests": [ + { + "description": "Valid - positive numerator and positive denominator", + "data": [ "1.5", "2" ], + "valid": true + }, + { + "description": "Valid - negative numerator and positive denominator", + "data": [ "-100", "3.5" ], + "valid": true + }, + { + "description": "Valid - positive numerator and negative denominator", + "data": [ "5", "-2.5" ], + "valid": true + }, + { + "description": "Valid - negative numerator and negative denominator", + "data": [ "-7", "-3" ], + "valid": true + }, + { + "description": "Valid - zero numerator with positive denominator", + "data": [ "0", "1" ], + "valid": true + }, + { + "description": "Valid - zero numerator with negative denominator", + "data": [ "0", "-5" ], + "valid": true + }, + { + "description": "Valid - zero numerator as decimal with positive denominator", + "data": [ "0.0", "2" ], + "valid": true + }, + { + "description": "Valid - whole number numerator and denominator", + "data": [ "3", "4" ], + "valid": true + }, + { + "description": "Valid - large positive values", + "data": [ "999999.999", "123456.789" ], + "valid": true + }, + { + "description": "Valid - large negative denominator", + "data": [ "1", "-999999.999" ], + "valid": true + }, + { + "description": "Valid - very small fractional denominator", + "data": [ "100", "0.001" ], + "valid": true + }, + { + "description": "Valid - very small negative fractional denominator", + "data": [ "100", "-0.001" ], + "valid": true + }, + { + "description": "Invalid - zero denominator", + "data": [ "1", "0" ], + "valid": false + }, + { + "description": "Invalid - zero denominator as 0.0", + "data": [ "1", "0.0" ], + "valid": false + }, + { + "description": "Invalid - zero denominator as 0.00", + "data": [ "5", "0.00" ], + "valid": false + }, + { + "description": "Invalid - zero denominator as -0", + "data": [ "3", "-0" ], + "valid": false + }, + { + "description": "Invalid - zero denominator as -0.0", + "data": [ "2", "-0.0" ], + "valid": false + }, + { + "description": "Invalid - zero denominator as 00", + "data": [ "1", "00" ], + "valid": false + }, + { + "description": "Invalid - zero denominator as 0.000", + "data": [ "1", "0.000" ], + "valid": false + }, + { + "description": "Invalid - only one element", + "data": [ "1" ], + "valid": false + }, + { + "description": "Invalid - three elements", + "data": [ "1", "2", "3" ], + "valid": false + }, + { + "description": "Invalid - empty array", + "data": [], + "valid": false + }, + { + "description": "Invalid - non-decimal numerator", + "data": [ "abc", "2" ], + "valid": false + }, + { + "description": "Invalid - non-decimal denominator", + "data": [ "1", "xyz" ], + "valid": false + }, + { + "description": "Invalid - number types instead of strings", + "data": [ 1.5, 2 ], + "valid": false + }, + { + "description": "Invalid - null numerator", + "data": [ null, "1" ], + "valid": false + }, + { + "description": "Invalid - null denominator", + "data": [ "1", null ], + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/g-day-item-type.test.json b/test/xbrl/instance/2003/g-day-item-type.test.json new file mode 100644 index 00000000..fe0711e9 --- /dev/null +++ b/test/xbrl/instance/2003/g-day-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/g-day-item-type.json", + "tests": [ + { + "description": "Valid - basic day", + "data": "---15", + "valid": true + }, + { + "description": "Valid - day with timezone", + "data": "---15Z", + "valid": true + }, + { + "description": "Valid - day with offset", + "data": "---15-05:00", + "valid": true + }, + { + "description": "Valid - first day of month", + "data": "---01", + "valid": true + }, + { + "description": "Invalid - day 00", + "data": "---00", + "valid": false + }, + { + "description": "Invalid - day 32", + "data": "---32", + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/g-month-day-item-type.test.json b/test/xbrl/instance/2003/g-month-day-item-type.test.json new file mode 100644 index 00000000..13a2b591 --- /dev/null +++ b/test/xbrl/instance/2003/g-month-day-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/g-month-day-item-type.json", + "tests": [ + { + "description": "Valid - basic month-day", + "data": "--10-15", + "valid": true + }, + { + "description": "Valid - month-day with timezone", + "data": "--10-15Z", + "valid": true + }, + { + "description": "Valid - month-day with offset", + "data": "--10-15-05:00", + "valid": true + }, + { + "description": "Valid - February 29th", + "data": "--02-29", + "valid": true + }, + { + "description": "Invalid - invalid month", + "data": "--13-01", + "valid": false + }, + { + "description": "Invalid - random string", + "data": "not-a-month-day", + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/g-month-item-type.test.json b/test/xbrl/instance/2003/g-month-item-type.test.json new file mode 100644 index 00000000..0a2d7966 --- /dev/null +++ b/test/xbrl/instance/2003/g-month-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/g-month-item-type.json", + "tests": [ + { + "description": "Valid - basic month", + "data": "--05", + "valid": true + }, + { + "description": "Valid - month with timezone", + "data": "--05Z", + "valid": true + }, + { + "description": "Valid - month with offset", + "data": "--05-05:00", + "valid": true + }, + { + "description": "Valid - December", + "data": "--12", + "valid": true + }, + { + "description": "Invalid - month 00", + "data": "--00", + "valid": false + }, + { + "description": "Invalid - month 13", + "data": "--13", + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/g-year-item-type.test.json b/test/xbrl/instance/2003/g-year-item-type.test.json new file mode 100644 index 00000000..cca57d5c --- /dev/null +++ b/test/xbrl/instance/2003/g-year-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/g-year-item-type.json", + "tests": [ + { + "description": "Valid - basic year", + "data": "2023", + "valid": true + }, + { + "description": "Valid - year with timezone", + "data": "2023Z", + "valid": true + }, + { + "description": "Valid - year with offset", + "data": "2023-05:00", + "valid": true + }, + { + "description": "Valid - negative year", + "data": "-0001", + "valid": true + }, + { + "description": "Invalid - year too short", + "data": "23", + "valid": false + }, + { + "description": "Invalid - random string", + "data": "not-a-year", + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/g-year-month-item-type.test.json b/test/xbrl/instance/2003/g-year-month-item-type.test.json new file mode 100644 index 00000000..d0b56087 --- /dev/null +++ b/test/xbrl/instance/2003/g-year-month-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/g-year-month-item-type.json", + "tests": [ + { + "description": "Valid - basic year-month", + "data": "2023-10", + "valid": true + }, + { + "description": "Valid - year-month with timezone", + "data": "2023-10Z", + "valid": true + }, + { + "description": "Valid - year-month with offset", + "data": "2023-10-05:00", + "valid": true + }, + { + "description": "Valid - negative year", + "data": "-0001-01", + "valid": true + }, + { + "description": "Invalid - invalid month", + "data": "2023-13", + "valid": false + }, + { + "description": "Invalid - random string", + "data": "not-a-year-month", + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/hex-binary-item-type.test.json b/test/xbrl/instance/2003/hex-binary-item-type.test.json new file mode 100644 index 00000000..4e1d4001 --- /dev/null +++ b/test/xbrl/instance/2003/hex-binary-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/hex-binary-item-type.json", + "tests": [ + { + "description": "Valid - hex binary", + "data": "48656C6C6F", + "valid": true + }, + { + "description": "Valid - lowercase hex", + "data": "deadbeef", + "valid": true + }, + { + "description": "Valid - empty string", + "data": "", + "valid": true + }, + { + "description": "Invalid - odd number of characters", + "data": "123", + "valid": false + }, + { + "description": "Invalid - non-hex characters", + "data": "GHIJ", + "valid": false + }, + { + "description": "Invalid - number instead of string", + "data": 123, + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/int-item-type.test.json b/test/xbrl/instance/2003/int-item-type.test.json new file mode 100644 index 00000000..7666f23b --- /dev/null +++ b/test/xbrl/instance/2003/int-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/int-item-type.json", + "tests": [ + { + "description": "Valid - positive int", + "data": 42, + "valid": true + }, + { + "description": "Valid - negative int", + "data": -100, + "valid": true + }, + { + "description": "Valid - zero", + "data": 0, + "valid": true + }, + { + "description": "Invalid - string instead of number", + "data": "42", + "valid": false + }, + { + "description": "Invalid - decimal value", + "data": 42.5, + "valid": false + }, + { + "description": "Invalid - non-numeric string", + "data": "abc", + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/integer-item-type.test.json b/test/xbrl/instance/2003/integer-item-type.test.json new file mode 100644 index 00000000..cd31c2cb --- /dev/null +++ b/test/xbrl/instance/2003/integer-item-type.test.json @@ -0,0 +1,41 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/integer-item-type.json", + "tests": [ + { + "description": "Valid - positive integer", + "data": "42", + "valid": true + }, + { + "description": "Valid - negative integer", + "data": "-100", + "valid": true + }, + { + "description": "Valid - zero", + "data": "0", + "valid": true + }, + { + "description": "Valid - large integer", + "data": "999999999999999999999999999999", + "valid": true + }, + { + "description": "Invalid - decimal value", + "data": "123.45", + "valid": false + }, + { + "description": "Invalid - non-numeric string", + "data": "abc", + "valid": false + }, + { + "description": "Invalid - number type instead of string", + "data": 42, + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/language-item-type.test.json b/test/xbrl/instance/2003/language-item-type.test.json new file mode 100644 index 00000000..e69680db --- /dev/null +++ b/test/xbrl/instance/2003/language-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/language-item-type.json", + "tests": [ + { + "description": "Valid - simple language code", + "data": "en", + "valid": true + }, + { + "description": "Valid - language with region", + "data": "en-US", + "valid": true + }, + { + "description": "Valid - complex language tag", + "data": "zh-Hant-HK", + "valid": true + }, + { + "description": "Valid - lowercase language code", + "data": "fr", + "valid": true + }, + { + "description": "Invalid - empty string", + "data": "", + "valid": false + }, + { + "description": "Invalid - invalid characters", + "data": "en_US", + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/long-item-type.test.json b/test/xbrl/instance/2003/long-item-type.test.json new file mode 100644 index 00000000..2f1b63f5 --- /dev/null +++ b/test/xbrl/instance/2003/long-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/long-item-type.json", + "tests": [ + { + "description": "Valid - positive long", + "data": 123456789, + "valid": true + }, + { + "description": "Valid - negative long", + "data": -987654321, + "valid": true + }, + { + "description": "Valid - zero", + "data": 0, + "valid": true + }, + { + "description": "Invalid - string instead of number", + "data": "123456789", + "valid": false + }, + { + "description": "Invalid - decimal value", + "data": 123.45, + "valid": false + }, + { + "description": "Invalid - non-numeric string", + "data": "abc", + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/monetary-item-type.test.json b/test/xbrl/instance/2003/monetary-item-type.test.json new file mode 100644 index 00000000..83915c53 --- /dev/null +++ b/test/xbrl/instance/2003/monetary-item-type.test.json @@ -0,0 +1,123 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/monetary-item-type.json", + "tests": [ + { + "description": "Valid - positive monetary value in USD", + "data": { + "value": "1234.56", + "currency": "USD" + }, + "valid": true + }, + { + "description": "Valid - negative monetary value in EUR", + "data": { + "value": "-789.12", + "currency": "EUR" + }, + "valid": true + }, + { + "description": "Valid - zero in GBP", + "data": { + "value": "0", + "currency": "GBP" + }, + "valid": true + }, + { + "description": "Valid - high precision in JPY", + "data": { + "value": "12345.123456789", + "currency": "JPY" + }, + "valid": true + }, + { + "description": "Valid - large value in CHF", + "data": { + "value": "999999999.99", + "currency": "CHF" + }, + "valid": true + }, + { + "description": "Valid - small fractional value in CAD", + "data": { + "value": "0.01", + "currency": "CAD" + }, + "valid": true + }, + { + "description": "Invalid - not a decimal string in value", + "data": { + "value": "abc", + "currency": "USD" + }, + "valid": false + }, + { + "description": "Invalid - empty string value", + "data": { + "value": "", + "currency": "USD" + }, + "valid": false + }, + { + "description": "Invalid - number type for value instead of string", + "data": { + "value": 123.45, + "currency": "USD" + }, + "valid": false + }, + { + "description": "Invalid - missing value field", + "data": { + "currency": "USD" + }, + "valid": false + }, + { + "description": "Invalid - missing currency field", + "data": { + "value": "100.50" + }, + "valid": false + }, + { + "description": "Invalid - invalid currency code", + "data": { + "value": "100.50", + "currency": "INVALID" + }, + "valid": false + }, + { + "description": "Invalid - lowercase currency code", + "data": { + "value": "100.50", + "currency": "usd" + }, + "valid": false + }, + { + "description": "Invalid - not an object", + "data": "1234.56", + "valid": false + }, + { + "description": "Invalid - null value", + "data": null, + "valid": false + }, + { + "description": "Invalid - array instead of object", + "data": [ "100.50", "USD" ], + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/name-item-type.test.json b/test/xbrl/instance/2003/name-item-type.test.json new file mode 100644 index 00000000..f02bfbaf --- /dev/null +++ b/test/xbrl/instance/2003/name-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/name-item-type.json", + "tests": [ + { + "description": "Valid - simple name", + "data": "elementName", + "valid": true + }, + { + "description": "Valid - name with colon", + "data": "xs:string", + "valid": true + }, + { + "description": "Valid - name with underscore", + "data": "my_element", + "valid": true + }, + { + "description": "Valid - name with dash", + "data": "my-element", + "valid": true + }, + { + "description": "Invalid - name starting with number", + "data": "1element", + "valid": false + }, + { + "description": "Invalid - name with space", + "data": "my element", + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/ncname-item-type.test.json b/test/xbrl/instance/2003/ncname-item-type.test.json new file mode 100644 index 00000000..24549248 --- /dev/null +++ b/test/xbrl/instance/2003/ncname-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/ncname-item-type.json", + "tests": [ + { + "description": "Valid - simple NCName", + "data": "elementName", + "valid": true + }, + { + "description": "Valid - NCName with underscore", + "data": "my_element", + "valid": true + }, + { + "description": "Valid - NCName with dash", + "data": "my-element", + "valid": true + }, + { + "description": "Valid - NCName starting with underscore", + "data": "_element", + "valid": true + }, + { + "description": "Invalid - NCName with colon", + "data": "xs:string", + "valid": false + }, + { + "description": "Invalid - NCName starting with number", + "data": "1element", + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/negative-integer-item-type.test.json b/test/xbrl/instance/2003/negative-integer-item-type.test.json new file mode 100644 index 00000000..8de095b1 --- /dev/null +++ b/test/xbrl/instance/2003/negative-integer-item-type.test.json @@ -0,0 +1,41 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/negative-integer-item-type.json", + "tests": [ + { + "description": "Valid - negative integer", + "data": "-42", + "valid": true + }, + { + "description": "Valid - large negative integer", + "data": "-999999999999999999999999", + "valid": true + }, + { + "description": "Valid - negative one", + "data": "-1", + "valid": true + }, + { + "description": "Invalid - zero", + "data": "0", + "valid": false + }, + { + "description": "Invalid - positive integer", + "data": "1", + "valid": false + }, + { + "description": "Invalid - decimal value", + "data": "-123.45", + "valid": false + }, + { + "description": "Invalid - number type instead of string", + "data": -42, + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/non-negative-integer-item-type.test.json b/test/xbrl/instance/2003/non-negative-integer-item-type.test.json new file mode 100644 index 00000000..8f8f9ec7 --- /dev/null +++ b/test/xbrl/instance/2003/non-negative-integer-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/non-negative-integer-item-type.json", + "tests": [ + { + "description": "Valid - positive integer", + "data": "42", + "valid": true + }, + { + "description": "Valid - zero", + "data": "0", + "valid": true + }, + { + "description": "Valid - large positive integer", + "data": "999999999999999999999999", + "valid": true + }, + { + "description": "Invalid - negative integer", + "data": "-1", + "valid": false + }, + { + "description": "Invalid - decimal value", + "data": "123.45", + "valid": false + }, + { + "description": "Invalid - number type instead of string", + "data": 42, + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/non-positive-integer-item-type.test.json b/test/xbrl/instance/2003/non-positive-integer-item-type.test.json new file mode 100644 index 00000000..c6c23ee1 --- /dev/null +++ b/test/xbrl/instance/2003/non-positive-integer-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/non-positive-integer-item-type.json", + "tests": [ + { + "description": "Valid - negative integer", + "data": "-42", + "valid": true + }, + { + "description": "Valid - zero", + "data": "0", + "valid": true + }, + { + "description": "Valid - large negative integer", + "data": "-999999999999999999999999", + "valid": true + }, + { + "description": "Invalid - positive integer", + "data": "1", + "valid": false + }, + { + "description": "Invalid - decimal value", + "data": "-123.45", + "valid": false + }, + { + "description": "Invalid - number type instead of string", + "data": 0, + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/normalized-string-item-type.test.json b/test/xbrl/instance/2003/normalized-string-item-type.test.json new file mode 100644 index 00000000..201b0923 --- /dev/null +++ b/test/xbrl/instance/2003/normalized-string-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/normalized-string-item-type.json", + "tests": [ + { + "description": "Valid - simple string", + "data": "hello world", + "valid": true + }, + { + "description": "Valid - string with spaces", + "data": "this is a normalized string", + "valid": true + }, + { + "description": "Valid - empty string", + "data": "", + "valid": true + }, + { + "description": "Invalid - string with line feed", + "data": "hello\nworld", + "valid": false + }, + { + "description": "Invalid - string with carriage return", + "data": "hello\rworld", + "valid": false + }, + { + "description": "Invalid - string with tab", + "data": "hello\tworld", + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/positive-integer-item-type.test.json b/test/xbrl/instance/2003/positive-integer-item-type.test.json new file mode 100644 index 00000000..db5c8881 --- /dev/null +++ b/test/xbrl/instance/2003/positive-integer-item-type.test.json @@ -0,0 +1,41 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/positive-integer-item-type.json", + "tests": [ + { + "description": "Valid - positive integer", + "data": "42", + "valid": true + }, + { + "description": "Valid - large positive integer", + "data": "999999999999999999999999", + "valid": true + }, + { + "description": "Valid - one", + "data": "1", + "valid": true + }, + { + "description": "Invalid - zero", + "data": "0", + "valid": false + }, + { + "description": "Invalid - negative integer", + "data": "-1", + "valid": false + }, + { + "description": "Invalid - decimal value", + "data": "123.45", + "valid": false + }, + { + "description": "Invalid - number type instead of string", + "data": 42, + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/pure-item-type.test.json b/test/xbrl/instance/2003/pure-item-type.test.json new file mode 100644 index 00000000..c7985d3f --- /dev/null +++ b/test/xbrl/instance/2003/pure-item-type.test.json @@ -0,0 +1,41 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/pure-item-type.json", + "tests": [ + { + "description": "Valid - pure number as decimal", + "data": "0.5", + "valid": true + }, + { + "description": "Valid - whole number", + "data": "1", + "valid": true + }, + { + "description": "Valid - negative pure number", + "data": "-0.25", + "valid": true + }, + { + "description": "Valid - high precision", + "data": "0.123456789", + "valid": true + }, + { + "description": "Invalid - not a decimal string", + "data": "not-a-number", + "valid": false + }, + { + "description": "Invalid - empty string", + "data": "", + "valid": false + }, + { + "description": "Invalid - number type instead of string", + "data": 0.5, + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/qname-item-type.test.json b/test/xbrl/instance/2003/qname-item-type.test.json new file mode 100644 index 00000000..ea245443 --- /dev/null +++ b/test/xbrl/instance/2003/qname-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/qname-item-type.json", + "tests": [ + { + "description": "Valid - prefixed QName", + "data": "xs:string", + "valid": true + }, + { + "description": "Valid - unprefixed QName", + "data": "localName", + "valid": true + }, + { + "description": "Valid - QName with underscore", + "data": "my_element", + "valid": true + }, + { + "description": "Invalid - QName starting with number", + "data": "1element", + "valid": false + }, + { + "description": "Invalid - QName with space", + "data": "my element", + "valid": false + }, + { + "description": "Invalid - number instead of string", + "data": 123, + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/shares-item-type.test.json b/test/xbrl/instance/2003/shares-item-type.test.json new file mode 100644 index 00000000..eb83ba62 --- /dev/null +++ b/test/xbrl/instance/2003/shares-item-type.test.json @@ -0,0 +1,41 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/shares-item-type.json", + "tests": [ + { + "description": "Valid - whole shares", + "data": "1000", + "valid": true + }, + { + "description": "Valid - fractional shares", + "data": "123.456", + "valid": true + }, + { + "description": "Valid - zero shares", + "data": "0", + "valid": true + }, + { + "description": "Valid - high precision fractional shares", + "data": "9876.123456", + "valid": true + }, + { + "description": "Invalid - not a decimal string", + "data": "xyz", + "valid": false + }, + { + "description": "Invalid - empty string", + "data": "", + "valid": false + }, + { + "description": "Invalid - number type instead of string", + "data": 1000, + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/short-item-type.test.json b/test/xbrl/instance/2003/short-item-type.test.json new file mode 100644 index 00000000..b16d42f4 --- /dev/null +++ b/test/xbrl/instance/2003/short-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/short-item-type.json", + "tests": [ + { + "description": "Valid - positive short", + "data": 100, + "valid": true + }, + { + "description": "Valid - negative short", + "data": -50, + "valid": true + }, + { + "description": "Valid - zero", + "data": 0, + "valid": true + }, + { + "description": "Invalid - string instead of number", + "data": "100", + "valid": false + }, + { + "description": "Invalid - decimal value", + "data": 10.5, + "valid": false + }, + { + "description": "Invalid - non-numeric string", + "data": "abc", + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/string-item-type.test.json b/test/xbrl/instance/2003/string-item-type.test.json new file mode 100644 index 00000000..02f851b9 --- /dev/null +++ b/test/xbrl/instance/2003/string-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/string-item-type.json", + "tests": [ + { + "description": "Valid - simple string", + "data": "hello", + "valid": true + }, + { + "description": "Valid - empty string", + "data": "", + "valid": true + }, + { + "description": "Valid - string with whitespace", + "data": "hello\nworld\t!", + "valid": true + }, + { + "description": "Valid - unicode string", + "data": "Hello 世界", + "valid": true + }, + { + "description": "Invalid - number instead of string", + "data": 123, + "valid": false + }, + { + "description": "Invalid - boolean instead of string", + "data": true, + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/time-item-type.test.json b/test/xbrl/instance/2003/time-item-type.test.json new file mode 100644 index 00000000..ea9d86cb --- /dev/null +++ b/test/xbrl/instance/2003/time-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/time-item-type.json", + "tests": [ + { + "description": "Valid - time with seconds", + "data": "12:30:45", + "valid": true + }, + { + "description": "Valid - time with timezone", + "data": "12:30:45Z", + "valid": true + }, + { + "description": "Valid - time with offset", + "data": "12:30:45-05:00", + "valid": true + }, + { + "description": "Valid - time with fractional seconds", + "data": "12:30:45.123", + "valid": true + }, + { + "description": "Invalid - missing seconds", + "data": "12:30", + "valid": false + }, + { + "description": "Invalid - random string", + "data": "not-a-time", + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/token-item-type.test.json b/test/xbrl/instance/2003/token-item-type.test.json new file mode 100644 index 00000000..f432ac9c --- /dev/null +++ b/test/xbrl/instance/2003/token-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/token-item-type.json", + "tests": [ + { + "description": "Valid - simple token", + "data": "token", + "valid": true + }, + { + "description": "Valid - token with single spaces", + "data": "hello world", + "valid": true + }, + { + "description": "Valid - empty string", + "data": "", + "valid": true + }, + { + "description": "Invalid - leading space", + "data": " token", + "valid": false + }, + { + "description": "Invalid - trailing space", + "data": "token ", + "valid": false + }, + { + "description": "Invalid - multiple consecutive spaces", + "data": "hello world", + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/unsigned-byte-item-type.test.json b/test/xbrl/instance/2003/unsigned-byte-item-type.test.json new file mode 100644 index 00000000..052e39a7 --- /dev/null +++ b/test/xbrl/instance/2003/unsigned-byte-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/unsigned-byte-item-type.json", + "tests": [ + { + "description": "Valid - positive unsigned byte", + "data": 42, + "valid": true + }, + { + "description": "Valid - zero", + "data": 0, + "valid": true + }, + { + "description": "Valid - maximum unsigned byte", + "data": 255, + "valid": true + }, + { + "description": "Invalid - negative value", + "data": -1, + "valid": false + }, + { + "description": "Invalid - decimal value", + "data": 42.5, + "valid": false + }, + { + "description": "Invalid - string instead of number", + "data": "42", + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/unsigned-int-item-type.test.json b/test/xbrl/instance/2003/unsigned-int-item-type.test.json new file mode 100644 index 00000000..61e4149f --- /dev/null +++ b/test/xbrl/instance/2003/unsigned-int-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/unsigned-int-item-type.json", + "tests": [ + { + "description": "Valid - positive unsigned int", + "data": 42, + "valid": true + }, + { + "description": "Valid - zero", + "data": 0, + "valid": true + }, + { + "description": "Valid - large unsigned int", + "data": 4294967295, + "valid": true + }, + { + "description": "Invalid - negative value", + "data": -1, + "valid": false + }, + { + "description": "Invalid - decimal value", + "data": 123.45, + "valid": false + }, + { + "description": "Invalid - string instead of number", + "data": "42", + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/unsigned-long-item-type.test.json b/test/xbrl/instance/2003/unsigned-long-item-type.test.json new file mode 100644 index 00000000..c028e840 --- /dev/null +++ b/test/xbrl/instance/2003/unsigned-long-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/unsigned-long-item-type.json", + "tests": [ + { + "description": "Valid - positive unsigned long", + "data": "123456789", + "valid": true + }, + { + "description": "Valid - zero", + "data": "0", + "valid": true + }, + { + "description": "Valid - large unsigned long", + "data": "18446744073709551615", + "valid": true + }, + { + "description": "Invalid - negative value", + "data": "-1", + "valid": false + }, + { + "description": "Invalid - decimal value", + "data": "123.45", + "valid": false + }, + { + "description": "Invalid - number type instead of string", + "data": 123456789, + "valid": false + } + ] +} diff --git a/test/xbrl/instance/2003/unsigned-short-item-type.test.json b/test/xbrl/instance/2003/unsigned-short-item-type.test.json new file mode 100644 index 00000000..f224de22 --- /dev/null +++ b/test/xbrl/instance/2003/unsigned-short-item-type.test.json @@ -0,0 +1,36 @@ +{ + "x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE", + "target": "../../../../schemas/xbrl/instance/2003/unsigned-short-item-type.json", + "tests": [ + { + "description": "Valid - positive unsigned short", + "data": 100, + "valid": true + }, + { + "description": "Valid - zero", + "data": 0, + "valid": true + }, + { + "description": "Valid - large unsigned short", + "data": 65535, + "valid": true + }, + { + "description": "Invalid - negative value", + "data": -1, + "valid": false + }, + { + "description": "Invalid - decimal value", + "data": 123.45, + "valid": false + }, + { + "description": "Invalid - string instead of number", + "data": "100", + "valid": false + } + ] +}