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.

299 lines
6.7KB

  1. From 50f531462274bb6c395ff1b63cf7c1016d7bb088 Mon Sep 17 00:00:00 2001
  2. From: David Robillard <d@drobilla.net>
  3. Date: Thu, 11 Mar 2021 13:55:08 -0500
  4. Subject: [PATCH] Remove unused datatypes from xsd.ttl
  5. This data costs memory, and I think it is better to not present things that
  6. aren't useful to LV2 implementations at all here.
  7. The whitespace annotations could be useful for cleaning up literals, but this
  8. isn't currently used (and tends to be baked in to implementations anyway), so
  9. remove them as well. If necessary they can be added later easily enough.
  10. ---
  11. schemas.lv2/xsd.ttl | 152 +++++---------------------------------------
  12. 1 file changed, 16 insertions(+), 136 deletions(-)
  13. diff --git a/schemas.lv2/xsd.ttl b/schemas.lv2/xsd.ttl
  14. index 47030624..007d84ed 100644
  15. --- a/schemas.lv2/xsd.ttl
  16. +++ b/schemas.lv2/xsd.ttl
  17. @@ -7,52 +7,15 @@ xsd:
  18. a owl:Ontology ;
  19. rdfs:comment "XML Schema Datatypes" .
  20. -xsd:ENTITY
  21. - a rdfs:Datatype ;
  22. - owl:onDatatype xsd:NCName .
  23. -
  24. -xsd:ID
  25. - a rdfs:Datatype ;
  26. - owl:onDatatype xsd:NCName .
  27. -
  28. -xsd:IDREF
  29. - a rdfs:Datatype ;
  30. - owl:onDatatype xsd:NCName .
  31. -
  32. -xsd:NCName
  33. - a rdfs:Datatype ;
  34. - owl:onDatatype xsd:Name .
  35. -
  36. -xsd:NMTOKEN
  37. - a rdfs:Datatype ;
  38. - owl:onDatatype xsd:token .
  39. -
  40. -xsd:Name
  41. - a rdfs:Datatype ;
  42. - owl:onDatatype xsd:token .
  43. -
  44. -xsd:QName
  45. - a rdfs:Datatype ;
  46. - rdfs:label "XML qualified name" ;
  47. - owl:onDatatype xsd:anySimpleType ;
  48. - owl:withRestrictions (
  49. - [
  50. - xsd:whiteSpace "collapse"
  51. - ]
  52. - ) .
  53. -
  54. xsd:anySimpleType
  55. - a rdfs:Datatype .
  56. + a rdfs:Datatype ;
  57. + rdfs:comment "The base class of any primitive XSD dataype." ;
  58. + rdfs:label "any simple type" .
  59. xsd:anyURI
  60. a rdfs:Datatype ;
  61. - rdfs:label "URI reference" ;
  62. - owl:onDatatype xsd:anySimpleType ;
  63. - owl:withRestrictions (
  64. - [
  65. - xsd:whiteSpace "collapse"
  66. - ]
  67. - ) .
  68. + rdfs:label "any URI" ;
  69. + owl:onDatatype xsd:anySimpleType .
  70. xsd:base64Binary
  71. a rdfs:Datatype ;
  72. @@ -62,8 +25,6 @@ xsd:base64Binary
  73. owl:withRestrictions (
  74. [
  75. xsd:pattern "(([A-Za-z0-9+/] *[A-Za-z0-9+/] *[A-Za-z0-9+/] *[A-Za-z0-9+/] *)*(([A-Za-z0-9+/] *[A-Za-z0-9+/] *[A-Za-z0-9+/] *[A-Za-z0-9+/])|([A-Za-z0-9+/] *[A-Za-z0-9+/] *[AEIMQUYcgkosw048] *=)|([A-Za-z0-9+/] *[AQgw] *= *=)))?"
  76. - ] [
  77. - xsd:whiteSpace "collapse"
  78. ]
  79. ) .
  80. @@ -74,8 +35,6 @@ xsd:boolean
  81. owl:withRestrictions (
  82. [
  83. xsd:pattern "(true|false|0|1)"
  84. - ] [
  85. - xsd:whiteSpace "collapse"
  86. ]
  87. ) .
  88. @@ -85,9 +44,9 @@ xsd:byte
  89. owl:onDatatype xsd:short ;
  90. owl:withRestrictions (
  91. [
  92. - xsd:minInclusive -128
  93. - ] [
  94. xsd:maxInclusive 127
  95. + ] [
  96. + xsd:minInclusive -128
  97. ]
  98. ) .
  99. @@ -98,8 +57,6 @@ xsd:date
  100. owl:withRestrictions (
  101. [
  102. xsd:pattern "-?[0-9][0-9][0-9][0-9][0-9]*-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(Z|[-+][0-2][0-9]:[0-5][0-9])?"
  103. - ] [
  104. - xsd:whiteSpace "collapse"
  105. ]
  106. ) .
  107. @@ -110,8 +67,6 @@ xsd:dateTime
  108. owl:withRestrictions (
  109. [
  110. xsd:pattern "-?[0-9][0-9][0-9][0-9][0-9]*-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T(([0-1][0-9])|(2[0-4])):[0-5][0-9]:[0-5][0-9](.[0-9]+)?(Z|[-+][0-2][0-9]:[0-5][0-9])?"
  111. - ] [
  112. - xsd:whiteSpace "collapse"
  113. ]
  114. ) .
  115. @@ -123,8 +78,6 @@ xsd:decimal
  116. owl:withRestrictions (
  117. [
  118. xsd:pattern "-?INF|NaN|[+-]?(([0-9]+[.]?[0-9]*)|([0-9]*[.]?[0-9]+))([eE][-+]?[0-9]+)?"
  119. - ] [
  120. - xsd:whiteSpace "collapse"
  121. ]
  122. ) .
  123. @@ -136,8 +89,6 @@ xsd:double
  124. owl:withRestrictions (
  125. [
  126. xsd:pattern "-?INF|NaN|[+-]?(([0-9]+[.]?[0-9]*)|([0-9]*[.]?[0-9]+))([eE][-+]?[0-9]+)?"
  127. - ] [
  128. - xsd:whiteSpace "collapse"
  129. ]
  130. ) .
  131. @@ -173,51 +124,6 @@ xsd:fractionDigits
  132. rdfs:label "fraction digits" ;
  133. rdfs:range xsd:nonNegativeInteger .
  134. -xsd:gDay
  135. - a rdfs:Datatype ;
  136. - owl:onDatatype xsd:anySimpleType ;
  137. - owl:withRestrictions (
  138. - [
  139. - xsd:whiteSpace "collapse"
  140. - ]
  141. - ) .
  142. -
  143. -xsd:gMonth
  144. - a rdfs:Datatype ;
  145. - owl:onDatatype xsd:anySimpleType ;
  146. - owl:withRestrictions (
  147. - [
  148. - xsd:whiteSpace "collapse"
  149. - ]
  150. - ) .
  151. -
  152. -xsd:gMonthDay
  153. - a rdfs:Datatype ;
  154. - owl:onDatatype xsd:anySimpleType ;
  155. - owl:withRestrictions (
  156. - [
  157. - xsd:whiteSpace "collapse"
  158. - ]
  159. - ) .
  160. -
  161. -xsd:gYear
  162. - a rdfs:Datatype ;
  163. - owl:onDatatype xsd:anySimpleType ;
  164. - owl:withRestrictions (
  165. - [
  166. - xsd:whiteSpace "collapse"
  167. - ]
  168. - ) .
  169. -
  170. -xsd:gYearMonth
  171. - a rdfs:Datatype ;
  172. - owl:onDatatype xsd:anySimpleType ;
  173. - owl:withRestrictions (
  174. - [
  175. - xsd:whiteSpace "collapse"
  176. - ]
  177. - ) .
  178. -
  179. xsd:hexBinary
  180. a rdfs:Datatype ;
  181. rdfs:comment "Hex-encoded arbitrary binary data." ;
  182. @@ -226,8 +132,6 @@ xsd:hexBinary
  183. owl:withRestrictions (
  184. [
  185. xsd:pattern "([0-9A-Fa-f][0-9A-Fa-f])*"
  186. - ] [
  187. - xsd:whiteSpace "collapse"
  188. ]
  189. ) .
  190. @@ -237,9 +141,9 @@ xsd:int
  191. owl:onDatatype xsd:long ;
  192. owl:withRestrictions (
  193. [
  194. - xsd:minInclusive -2147483648
  195. - ] [
  196. xsd:maxInclusive 2147483647
  197. + ] [
  198. + xsd:minInclusive -2147483648
  199. ]
  200. ) .
  201. @@ -271,9 +175,9 @@ xsd:long
  202. owl:onDatatype xsd:integer ;
  203. owl:withRestrictions (
  204. [
  205. - xsd:minInclusive -9223372036854775808
  206. - ] [
  207. xsd:maxInclusive 9223372036854775807
  208. + ] [
  209. + xsd:minInclusive -9223372036854775808
  210. ]
  211. ) .
  212. @@ -339,12 +243,7 @@ xsd:normalizedString
  213. a rdfs:Datatype ;
  214. rdfs:comment "The set of strings that do not contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters." ;
  215. rdfs:label "normalized string" ;
  216. - owl:onDatatype xsd:string ;
  217. - owl:withRestrictions (
  218. - [
  219. - xsd:whiteSpace "replace"
  220. - ]
  221. - ) .
  222. + owl:onDatatype xsd:string .
  223. xsd:pattern
  224. a rdf:Property ,
  225. @@ -370,9 +269,9 @@ xsd:short
  226. owl:onDatatype xsd:int ;
  227. owl:withRestrictions (
  228. [
  229. - xsd:minInclusive -32768
  230. - ] [
  231. xsd:maxInclusive 32767
  232. + ] [
  233. + xsd:minInclusive -32768
  234. ]
  235. ) .
  236. @@ -380,12 +279,7 @@ xsd:string
  237. a rdfs:Datatype ;
  238. rdfs:comment "A character string." ;
  239. rdfs:label "string" ;
  240. - owl:onDatatype xsd:anySimpleType ;
  241. - owl:withRestrictions (
  242. - [
  243. - xsd:whiteSpace "preserve"
  244. - ]
  245. - ) .
  246. + owl:onDatatype xsd:anySimpleType .
  247. xsd:time
  248. a rdfs:Datatype ;
  249. @@ -394,8 +288,6 @@ xsd:time
  250. owl:withRestrictions (
  251. [
  252. xsd:pattern "(([0-1][0-9])|(2[0-4])):[0-5][0-9]:[0-5][0-9](.[0-9]+)?(Z|[-+][0-2][0-9]:[0-5][0-9])?"
  253. - ] [
  254. - xsd:whiteSpace "collapse"
  255. ]
  256. ) .
  257. @@ -403,19 +295,7 @@ xsd:token
  258. a rdfs:Datatype ;
  259. rdfs:comment "The set of strings that do not contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters, that have no leading or trailing spaces (#x20) and that have no internal sequences of two or more spaces." ;
  260. rdfs:label "token" ;
  261. - owl:onDatatype xsd:normalizedString ;
  262. - owl:withRestrictions (
  263. - [
  264. - xsd:whiteSpace "collapse"
  265. - ]
  266. - ) .
  267. -
  268. -xsd:totalDigits
  269. - a rdf:Property ,
  270. - owl:DatatypeProperty ;
  271. - rdfs:comment "The maximum number of decimal digits required to represent a value." ;
  272. - rdfs:label "total digits" ;
  273. - rdfs:range xsd:positiveInteger .
  274. + owl:onDatatype xsd:normalizedString .
  275. xsd:unsignedByte
  276. a rdfs:Datatype ;