Manifeste

1
datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes"
2
namespace cid="http://www.cid-protocol.org/schema/v1/core"
3
namespace local = ""
4
5
grammar{
6
7
#Defininition of a user description
8
user-desc = 
9
  element cid:label{attribute xml:lang {text}?,text}*,   
10
  element cid:doc{attribute xml:lang {text},text}*
11
12
#Definition of a step
13
step-def = 
14
  #URL to use in the transport
15
  attribute url{xsd:anyURI},
16
  #Mandatory metas
17
  attribute needMetas{list{xsd:NCName+}}?,
18
  #Accepted metas
19
  attribute useMetas{list{xsd:NCName+}}?,
20
  #Returned metas
21
  attribute returnMetas{list{xsd:NCName+}}?,
22
  #Mandatory step
23
  attribute required{xsd:boolean},
24
  #URI which define the step
25
  attribute is{list{xsd:anyURI+}}?  
26
27
#Definition of a request for web interact
28
webInteractRequest-def =
29
  element cid:request{
30
    #Supported methods
31
    attribute method{"GET"|"POST;application/x-www-form-urlencoded"|"POST;multipart/form-data"},
32
    #Supported property storages
33
    attribute properties{list{("header" | "queryString" | "post")+}}?,
34
    
35
    attribute excludeHeaderUriEncoding{list{xsd:NCName+}}?
36
  }
37
38
#Definition of a request for web data exchange
39
webExchangeRequest-def = 
40
  element cid:request{
41
    #Supported methods
42
    attribute method{"GET"|"POST;application/x-www-form-urlencoded"|"POST;multipart/form-data"},
43
    #Supported property storages
44
    attribute properties{list{("header" | "queryString" | "post")+}}?,
45
    
46
    attribute excludeHeaderUriEncoding{list{xsd:NCName+}}?
47
  }
48
49
#Definition of a request for web upload
50
webUploadRequest-def =
51
  element cid:request{
52
    #Supported methods
53
    attribute method{"PUT"|"GET"|"POST"|"POST;multipart/form-data"},
54
    #Supported property storages
55
    attribute properties{list{("header" | "queryString" | "post")+}}?,
56
    
57
    attribute excludeHeaderUriEncoding{list{xsd:NCName+}}?
58
  }
59
60
#Definition of a transport property
61
prop-def = element property{attribute key{xsd:NCName},attribute value{xsd:NCName}}
62
63
#Definition of chunked file upload
64
chunk-def = 
65
  element preliminaryChunk{attribute strategy{"sequential"|"unordered"|"random"},prop-def?}?,
66
  element finalChunk{prop-def}?
67
  
68
#Definition of system wait
69
systWait-def = element systemWait{prop-def?,webExchangeRequest-def+}
70
71
#Definition of user wait
72
userWait-def = element userWait{prop-def?,webInteractRequest-def+}
73
74
#Definition of foreign element (use to valid a CID extension)
75
foreign-elements = element * - (cid:* | local:*) { anything  }*
76
anything = ( element * - (cid:* | local:*) { anything } | attribute * { text } | text )*
77
78
79
start =
80
element cid:manifest{
81
  #Manifest documentation
82
  user-desc,
83
  
84
  #Processes definition
85
  element cid:process{
86
    #Transports binded to this process
87
    attribute transports{xsd:IDREFS}?,
88
    #URI which defines this process
89
    attribute is{list{xsd:anyURI+}}?,
90
    #Process documentation
91
    user-desc,
92
    
93
    #Restriction on the meta used by the system
94
    element cid:restriction{
95
      #Name of the meta
96
      attribute name{xsd:NCName},
97
      #URI which defines the meta
98
      attribute is{list{xsd:anyURI+}}?,
99
      #Mandatory value of the meta
100
      attribute value{text},
101
      #Meta documentation
102
      user-desc
103
    }*,
104
    
105
    #Definition of a meta
106
    element cid:meta{
107
      #Name of the meta
108
      attribute name{xsd:NCName},
109
      #Accepted cardinality of the meta
110
      attribute cardinality{"1"|"?"|"+"|"*"}?,
111
      #URI which defines the meta
112
      attribute is{list{xsd:anyURI+}}?,
113
      #Meta documentation
114
      user-desc,
115
      #Restricted values
116
      element cid:value{text}*
117
    }*,
118
    
119
    (
120
      #Data exchange step
121
      element cid:exchange{step-def, attribute exchangeTransports{xsd:IDREFS}?} |
122
      #User interact step
123
      element cid:interact{step-def, attribute interactTransports{xsd:IDREFS}?} |
124
      #File upload step
125
      element cid:upload  {step-def, attribute uploadTransports{xsd:IDREFS}?}
126
    )+
127
  }+,
128
  
129
  #Definition of supported authentications scheme
130
  element cid:authentications{
131
    #No authentication
132
    element cid:noAuthentication{empty}?&
133
    #Basic HTTP Authentication
134
    element cid:basicHttp{empty}?&
135
    #CAS Authentication
136
    element cid:cas{attribute url{xsd:anyURI}}?&
137
    #Internal Authentication (+cookie or properties)
138
    element cid:internal{attribute url{xsd:anyURI},attribute authProperties{list{xsd:NCName+}}?}?&
139
    #CID extension allowed
140
    foreign-elements*
141
  }?,
142
  
143
  #Supported transport definition
144
  element cid:transports{
145
    #Web transport definition
146
    element cid:webTransport{
147
      #Id of the transport
148
      attribute id{xsd:ID}?,
149
      #Mandatory support of cookies
150
      attribute needCookies{xsd:boolean}?,
151
      #Mandatory support of session properties. Properties name definition
152
      attribute sessionProperties{list{xsd:NCName+}}?,
153
      (
154
        #Data exchange web transport definition
155
        element cid:webExchange{attribute id{xsd:ID}?,webExchangeRequest-def+}|
156
        #User interact web transport definition
157
        element cid:webInteract{attribute id{xsd:ID}?,webInteractRequest-def+}|
158
        #File upload web transport definition
159
        element cid:webUpload  {attribute id{xsd:ID}?,webUploadRequest-def+, chunk-def }|
160
        #Asynchronous file upload definition
161
        element cid:webAsyncUpload{
162
          attribute id{xsd:ID}?,                    
163
          webUploadRequest-def+,
164
          ((systWait-def, userWait-def?) | (userWait-def, systWait-def?)),
165
          chunk-def
166
        }
167
      )+
168
    }*,
169
    #CID extension allowed
170
    foreign-elements*
171
  }
172
}
173
174
}