lost1.xsd 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  1. default namespace ns1 = "urn:ietf:params:xml:ns:lost1"
  2. ##
  3. ## Location-to-Service Translation Protocol (LoST)
  4. ##
  5. ## A LoST XML instance has three request types, each with
  6. ## a cooresponding response type: find service, list services,
  7. ## and get service boundary.
  8. ##
  9. start =
  10. findService
  11. | listServices
  12. | listServicesByLocation
  13. | getServiceBoundary
  14. | findServiceResponse
  15. | listServicesResponse
  16. | listServicesByLocationResponse
  17. | getServiceBoundaryResponse
  18. | errors
  19. | redirect
  20. ##
  21. ## The queries.
  22. ##
  23. div {
  24. findService =
  25. element findService {
  26. requestLocation,
  27. commonRequestPattern,
  28. attribute validateLocation {
  29. xsd:boolean >> a:defaultValue [ "false" ]
  30. }?,
  31. attribute serviceBoundary {
  32. ("reference" | "value") >> a:defaultValue [ "reference" ]
  33. }?,
  34. attribute recursive { xsd:boolean >> a:defaultValue [ "false" ] }?
  35. }
  36. listServices = element listServices { commonRequestPattern }
  37. listServicesByLocation =
  38. element listServicesByLocation {
  39. requestLocation,
  40. commonRequestPattern,
  41. attribute recursive { xsd:boolean >> a:defaultValue [ "true" ] }?
  42. }
  43. getServiceBoundary =
  44. element getServiceBoundary { serviceBoundaryKey, extensionPoint }
  45. }
  46. ##
  47. ## The responses.
  48. ##
  49. div {
  50. findServiceResponse =
  51. element findServiceResponse {
  52. mapping+, locationValidation?, commonResponsePattern, locationUsed
  53. }
  54. listServicesResponse =
  55. element listServicesResponse { serviceList, commonResponsePattern }
  56. listServicesByLocationResponse =
  57. element listServicesByLocationResponse {
  58. serviceList, commonResponsePattern, locationUsed
  59. }
  60. getServiceBoundaryResponse =
  61. element getServiceBoundaryResponse {
  62. serviceBoundary, commonResponsePattern
  63. }
  64. }
  65. ##
  66. ## A pattern common to some of the queries.
  67. ##
  68. div {
  69. commonRequestPattern = service, path?, extensionPoint
  70. }
  71. ##
  72. ## A pattern common to responses.
  73. ##
  74. div {
  75. commonResponsePattern = warnings*, path, extensionPoint
  76. }
  77. ##
  78. ## Location in Requests
  79. ##
  80. div {
  81. requestLocation =
  82. element location {
  83. attribute id { xsd:token },
  84. locationInformation
  85. }+
  86. }
  87. ##
  88. ## Location Information
  89. ##
  90. div {
  91. locationInformation =
  92. extensionPoint+,
  93. attribute profile { xsd:NMTOKEN }?
  94. }
  95. ##
  96. ## Service Boundary
  97. ##
  98. div {
  99. serviceBoundary = element serviceBoundary { locationInformation }+
  100. }
  101. ##
  102. ## Service Boundary Reference
  103. ##
  104. div {
  105. serviceBoundaryReference =
  106. element serviceBoundaryReference {
  107. source, serviceBoundaryKey, extensionPoint
  108. }
  109. serviceBoundaryKey = attribute key { xsd:token }
  110. }
  111. ##
  112. ## Path -
  113. ## Contains a list of via elements -
  114. ## places through which information flowed
  115. ##
  116. div {
  117. path =
  118. element path {
  119. element via { source, extensionPoint }+
  120. }
  121. }
  122. ##
  123. ## Location Used
  124. ##
  125. div {
  126. locationUsed =
  127. element locationUsed {
  128. attribute id { xsd:token }
  129. }?
  130. }
  131. ##
  132. ## Expires pattern
  133. ##
  134. div {
  135. expires =
  136. attribute expires { xsd:dateTime | "NO-CACHE" | "NO-EXPIRATION" }
  137. }
  138. ##
  139. ## A QName list
  140. ##
  141. div {
  142. qnameList = list { xsd:QName* }
  143. }
  144. ##
  145. ## A location-to-service mapping.
  146. ##
  147. div {
  148. mapping =
  149. element mapping {
  150. element displayName {
  151. xsd:string,
  152. attribute xml:lang { xsd:language }
  153. }*,
  154. service,
  155. (serviceBoundary | serviceBoundaryReference)?,
  156. element uri { xsd:anyURI }*,
  157. element serviceNumber {
  158. xsd:token { pattern = "[0-9*#]+" }
  159. }?,
  160. extensionPoint,
  161. expires,
  162. attribute lastUpdated { xsd:dateTime },
  163. source,
  164. attribute sourceId { xsd:token },
  165. message
  166. }
  167. }
  168. ##
  169. ## Location validation
  170. ##
  171. div {
  172. locationValidation =
  173. element locationValidation {
  174. element valid { qnameList }?,
  175. element invalid { qnameList }?,
  176. element unchecked { qnameList }?,
  177. extensionPoint
  178. }
  179. }
  180. ##
  181. ## Errors and Warnings Container.
  182. ##
  183. div {
  184. exceptionContainer =
  185. (badRequest?
  186. & internalError?
  187. & serviceSubstitution?
  188. & defaultMappingReturned?
  189. & forbidden?
  190. & notFound?
  191. & loop?
  192. & serviceNotImplemented?
  193. & serverTimeout?
  194. & serverError?
  195. & locationInvalid?
  196. & locationProfileUnrecognized?),
  197. extensionPoint,
  198. source
  199. errors = element errors { exceptionContainer }
  200. warnings = element warnings { exceptionContainer }
  201. }
  202. ##
  203. ## Basic Exceptions
  204. ##
  205. div {
  206. ##
  207. ## Exception pattern.
  208. ##
  209. basicException = message, extensionPoint
  210. badRequest = element badRequest { basicException }
  211. internalError = element internalError { basicException }
  212. serviceSubstitution = element serviceSubstitution { basicException }
  213. defaultMappingReturned =
  214. element defaultMappingReturned { basicException }
  215. forbidden = element forbidden { basicException }
  216. notFound = element notFound { basicException }
  217. loop = element loop { basicException }
  218. serviceNotImplemented =
  219. element serviceNotImplemented { basicException }
  220. serverTimeout = element serverTimeout { basicException }
  221. serverError = element serverError { basicException }
  222. locationInvalid = element locationInvalid { basicException }
  223. locationValidationUnavailable =
  224. element locationValidationUnavailable { basicException }
  225. locationProfileUnrecognized =
  226. element locationProfileUnrecognized {
  227. attribute unsupportedProfiles { xsd:NMTOKENS },
  228. basicException
  229. }
  230. }
  231. ##
  232. ## Redirect.
  233. ##
  234. div {
  235. ##
  236. ## Redirect pattern
  237. ##
  238. redirect =
  239. element redirect {
  240. attribute target { appUniqueString },
  241. source,
  242. message,
  243. extensionPoint
  244. }
  245. }
  246. ##
  247. ## Some common patterns.
  248. ##
  249. div {
  250. message =
  251. (attribute message { xsd:token },
  252. attribute xml:lang { xsd:language })?
  253. service = element service { xsd:anyURI }?
  254. appUniqueString =
  255. xsd:token { pattern = "([a-zA-Z0-9\-]+\.)+[a-zA-Z0-9]+" }
  256. source = attribute source { appUniqueString }
  257. serviceList =
  258. element serviceList {
  259. list { xsd:anyURI* }
  260. }
  261. }
  262. ##
  263. ## Patterns for inclusion of elements from schemas in
  264. ## other namespaces.
  265. ##
  266. div {
  267. ##
  268. ## Any element not in the LoST namespace.
  269. ##
  270. notLost = element * - (ns1:* | ns1:*) { anyElement }
  271. ##
  272. ## A wildcard pattern for including any element
  273. ## from any other namespace.
  274. ##
  275. anyElement =
  276. (element * { anyElement }
  277. | attribute * { text }
  278. | text)*
  279. ##
  280. ## A point where future extensions
  281. ## (elements from other namespaces)
  282. ## can be added.
  283. ##
  284. extensionPoint = notLost*
  285. }