External, Non-PPA KXStudio Repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
2.6KB

  1. From b37402500176b328a6a5752df2a170538cc9594c Mon Sep 17 00:00:00 2001
  2. From: David Robillard <d@drobilla.net>
  3. Date: Thu, 11 Mar 2021 14:47:36 -0500
  4. Subject: [PATCH] Use matching datatypes for fixed-size bounds in xsd.ttl
  5. This avoids the need to do any datatype conversion for handling bounds. In
  6. particular, it avoids troublesome range issues, like the maximum
  7. xsd:unsignedLong being too large to fit in an xsd:long, which is likely what an
  8. implementation without bigint support uses to represent xsd:integer.
  9. So, avoid all of that by simply using the exact datatype in bounds for that
  10. datatype, which makes more sense anyway.
  11. ---
  12. schemas.lv2/xsd.ttl | 24 ++++++++++++------------
  13. 1 file changed, 12 insertions(+), 12 deletions(-)
  14. diff --git a/schemas.lv2/xsd.ttl b/schemas.lv2/xsd.ttl
  15. index 007d84ed..cb983634 100644
  16. --- a/schemas.lv2/xsd.ttl
  17. +++ b/schemas.lv2/xsd.ttl
  18. @@ -44,9 +44,9 @@ xsd:byte
  19. owl:onDatatype xsd:short ;
  20. owl:withRestrictions (
  21. [
  22. - xsd:maxInclusive 127
  23. + xsd:maxInclusive "127"^^xsd:byte
  24. ] [
  25. - xsd:minInclusive -128
  26. + xsd:minInclusive "-128"^^xsd:byte
  27. ]
  28. ) .
  29. @@ -141,9 +141,9 @@ xsd:int
  30. owl:onDatatype xsd:long ;
  31. owl:withRestrictions (
  32. [
  33. - xsd:maxInclusive 2147483647
  34. + xsd:maxInclusive "2147483647"^^xsd:int
  35. ] [
  36. - xsd:minInclusive -2147483648
  37. + xsd:minInclusive "-2147483648"^^xsd:int
  38. ]
  39. ) .
  40. @@ -175,9 +175,9 @@ xsd:long
  41. owl:onDatatype xsd:integer ;
  42. owl:withRestrictions (
  43. [
  44. - xsd:maxInclusive 9223372036854775807
  45. + xsd:maxInclusive "9223372036854775807"^^xsd:long
  46. ] [
  47. - xsd:minInclusive -9223372036854775808
  48. + xsd:minInclusive "-9223372036854775808"^^xsd:long
  49. ]
  50. ) .
  51. @@ -269,9 +269,9 @@ xsd:short
  52. owl:onDatatype xsd:int ;
  53. owl:withRestrictions (
  54. [
  55. - xsd:maxInclusive 32767
  56. + xsd:maxInclusive "32767"^^xsd:short
  57. ] [
  58. - xsd:minInclusive -32768
  59. + xsd:minInclusive "-32768"^^xsd:short
  60. ]
  61. ) .
  62. @@ -303,7 +303,7 @@ xsd:unsignedByte
  63. owl:onDatatype xsd:unsignedShort ;
  64. owl:withRestrictions (
  65. [
  66. - xsd:maxInclusive 255
  67. + xsd:maxInclusive "255"^^xsd:unsignedByte
  68. ]
  69. ) .
  70. @@ -313,7 +313,7 @@ xsd:unsignedInt
  71. owl:onDatatype xsd:unsignedLong ;
  72. owl:withRestrictions (
  73. [
  74. - xsd:maxInclusive 4294967295
  75. + xsd:maxInclusive "4294967295"^^xsd:unsignedInt
  76. ]
  77. ) .
  78. @@ -323,7 +323,7 @@ xsd:unsignedLong
  79. owl:onDatatype xsd:nonNegativeInteger ;
  80. owl:withRestrictions (
  81. [
  82. - xsd:maxInclusive 18446744073709551615
  83. + xsd:maxInclusive "18446744073709551615"^^xsd:unsignedLong
  84. ]
  85. ) .
  86. @@ -333,7 +333,7 @@ xsd:unsignedShort
  87. owl:onDatatype xsd:unsignedInt ;
  88. owl:withRestrictions (
  89. [
  90. - xsd:maxInclusive 65535
  91. + xsd:maxInclusive "65535"^^xsd:unsignedShort
  92. ]
  93. ) .