root/releases/bedework-3.6/deployment/resources/xsl/default/default/errors.xsl

Revision 3219 (checked in by douglm, 2 years ago)

Validate the URI property on input.

On conversion to icalendar ignore bad uris

  • Property svn:eol-style set to LF
Line 
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3   <!-- Apart from the exception - trapped first, these are in alphabetic order of
4        error code. -->
5   <xsl:template match="error">
6     <xsl:choose>
7       <xsl:when test="id='org.bedework.client.error.exc'"><!-- trap exceptions first -->
8         An exception occurred: <em><xsl:value-of select="param"/></em>
9       </xsl:when>
10       <xsl:when test="id='edu.rpi.sss.util.error.exc'">
11         An exception occurred: <em><xsl:value-of select="param"/></em>
12       </xsl:when>
13       <xsl:when test="id='org.bedework.exception.norecurrenceinstances'">
14         Event or task has no recurrence instances: <em><xsl:value-of select="param"/></em>
15       </xsl:when>
16
17       <!-- client.error messages generally do not quite constitute validation errors
18            which mostly involve changing a field content.
19            Usually when we flag a data error here, it is due to a bug in the xsl -->
20
21       <xsl:when test="id='org.bedework.client.error.admingroupassignedcs'">
22         Error: admin group is assigned to: <em><xsl:value-of select="param"/></em>
23       </xsl:when>
24       <xsl:when test="id='org.bedework.client.error.alreadymember'">
25         Error: already a member: <em><xsl:value-of select="param"/></em>
26       </xsl:when>
27       <xsl:when test="id='org.bedework.client.error.badinterval'">
28         Error: bad interval.
29       </xsl:when>
30       <xsl:when test="id='org.bedework.client.error.badintervalunit'">
31         Error: bad interval unit.
32       </xsl:when>
33       <xsl:when test="id='org.bedework.client.error.badrequest'">
34         Error: Bad request.
35       </xsl:when>
36       <xsl:when test="id='org.bedework.client.error.badschedulewhat'">
37         Error: Bad scheduling what parameter.
38       </xsl:when>
39       <xsl:when test="id='org.bedework.error.scheduling.baddestinationcalendar'">
40         Error: You must set a destination calendar
41       </xsl:when>
42       <xsl:when test="id='org.bedework.client.error.calsuitenotadded'">
43         Error: calendar suite not added.
44       </xsl:when>
45       <xsl:when test="id='org.bedework.client.error.cannotchangecalmode'">
46         Forbidden: you are not allowed to change the mode of the non-empty
47         collection <em><xsl:value-of select="param"/></em>.
48       </xsl:when>
49       <xsl:when test="id='org.bedework.client.error.cannotdeletehome'">
50         Forbidden: you are not allowed to delete your calendar home.
51         <em><xsl:value-of select="param"/></em>.
52       </xsl:when>
53       <xsl:when test="id='org.bedework.client.error.cannotmovehome'">
54         Forbidden: you are not allowed to move your calendar home. */
55         <em><xsl:value-of select="param"/></em>.
56       </xsl:when>
57       <xsl:when test="id='org.bedework.client.error.choosegroupsuppressed'">
58         Error: choose group is suppressed.  You cannot perform that action at this time.
59       </xsl:when>
60       <xsl:when test="id='org.bedework.client.error.duplicatecategory'">
61         Cannot add: the category already exists.
62       </xsl:when>
63       <xsl:when test="id='org.bedework.client.error.duplicatecontact'">
64         Cannot add: the contact already exists.
65       </xsl:when>
66       <xsl:when test="id='org.bedework.client.error.duplicategroup'">
67         Error: duplicate group.  <em><xsl:value-of select="param"/></em> already exists.
68       </xsl:when>
69       <xsl:when test="id='org.bedework.client.error.duplicatelocation'">
70         Cannot add: the location already exists.
71       </xsl:when>
72       <xsl:when test="id='org.bedework.client.error.duplicateuid'">
73           Duplicate uid: this event already exists in this calendar.
74       </xsl:when>
75       <xsl:when test="id='org.bedework.client.error.failed.overrides'">
76           Error: there were <xsl:value-of select="param"/> failed overrides.
77       </xsl:when>
78       <xsl:when test="id='org.bedework.client.error.mail.norecipient'">
79         Error: the email has no recipient.
80       </xsl:when>
81       <xsl:when test="id='org.bedework.client.error.missingcalendarpath'">
82         Error: missing calendar path.
83       </xsl:when>
84       <xsl:when test="id='org.bedework.client.error.missingeventkeyfields'">
85         Error: missing event key fields
86       </xsl:when>
87       <xsl:when test="id='org.bedework.client.error.missingfilename'">
88           You must supply a file name (required).
89       </xsl:when>
90       <xsl:when test="id='org.bedework.client.error.missingrequestpar'">
91           Missing request parameter: <em><xsl:value-of select="param"/></em>.
92       </xsl:when>
93       <xsl:when test="id='org.bedework.client.error.missingschedulewhat'">
94         Error: Missing scheduling what parameter.
95       </xsl:when>
96       <xsl:when test="id='org.bedework.client.error.multipleevents'">
97         System Error: Multiple events when one expected.
98       </xsl:when>
99       <xsl:when test="id='org.bedework.client.error.noaccess'">
100         Error: no access.
101       </xsl:when>
102       <xsl:when test="id='org.bedework.client.error.nocalsuiteaccess'">
103         Error: no access to calendar suite for group <em><xsl:value-of select="param"/></em>.
104       </xsl:when>
105       <xsl:when test="id='org.bedework.client.error.nodefaultview'">
106           No default view defined
107       </xsl:when>
108       <xsl:when test="id='org.bedework.client.error.norecurrenceinstances'">
109           There are no instances for this recurring event.
110       </xsl:when>
111       <xsl:when test="id='org.bedework.client.error.noschedulingaccess'">
112           You cannot schedule events with user <em><xsl:value-of select="param"/></em>.
113       </xsl:when>
114       <xsl:when test="id='org.bedework.client.error.ongrouppath'">
115         Error: group may not be added to itself.
116       </xsl:when>
117       <xsl:when test="id='org.bedework.client.error.onlyfrominbox'">
118         You can only respond from your inbox.
119       </xsl:when>
120       <xsl:when test="id='org.bedework.client.error.onlytoinbox'">
121         You can only reply to an inbox.
122       </xsl:when>
123       <xsl:when test="id='org.bedework.client.error.referenced.calendar'">
124         Cannot delete: the calendar is not empty.
125       </xsl:when>
126       <xsl:when test="id='org.bedework.client.error.referenced.category'">
127         Cannot delete: the category is referenced by events or collections.
128       </xsl:when>
129       <xsl:when test="id='org.bedework.client.error.referenced.contact'">
130         Cannot delete: the contact is referenced by events.
131       </xsl:when>
132       <xsl:when test="id='org.bedework.client.error.referenced.location'">
133         Cannot delete: the location is referenced by events.
134       </xsl:when>
135       <xsl:when test="id='org.bedework.client.error.referenced.subscription'">
136         Cannot delete: the subscription is included in view <em><xsl:value-of select="param"/></em>.<br/>
137         You must remove the subscription from this view before deleting.
138       </xsl:when>
139       <xsl:when test="id='org.bedework.error.timezones.readerror'">
140         Timzone error: could not read file.
141       </xsl:when>
142       <!-- things we cannot find -->
143       <xsl:when test="id='org.bedework.client.error.unknown.attendee'">
144           Unknown attendee <em><xsl:value-of select="param"/></em>
145       </xsl:when>
146       <xsl:when test="id='org.bedework.client.error.unknown.calendar'">
147         Not found: there is no calendar with the path <em><xsl:value-of select="param"/></em>.
148       </xsl:when>
149       <xsl:when test="id='org.bedework.client.error.unknown.calendarsuite'">
150         There is no calendar suite with the name <em><xsl:value-of select="param"/></em>.
151       </xsl:when>
152       <xsl:when test="id='org.bedework.client.error.unknown.calendartype'">
153         System error: there is no calendar with the type <em><xsl:value-of select="param"/></em>.
154       </xsl:when>
155       <xsl:when test="id='org.bedework.client.error.unknown.category'">
156         Not found: there is no category with the keyword <em><xsl:value-of select="param"/></em>.
157       </xsl:when>
158       <xsl:when test="id='org.bedework.client.error.unknown.contact'">
159         Not found: there is no contact <em><xsl:value-of select="param"/></em>.
160       </xsl:when>
161       <xsl:when test="id='org.bedework.client.error.unknown.event'">
162           Event <xsl:value-of select="param"/> does not exist.
163       </xsl:when>
164       <xsl:when test="id='org.bedework.client.error.unknown.group'">
165         Error: unknown group:  <em><xsl:value-of select="param"/></em>.
166       </xsl:when>
167       <xsl:when test="id='org.bedework.client.error.unknown.location'">
168         Not found: there is no location identified by the id <em><xsl:value-of select="param"/></em>.
169       </xsl:when>
170       <xsl:when test="id='org.bedework.client.error.unknown.subscription'">
171         Not found: there is no user identified by the name <em><xsl:value-of select="param"/></em>.
172       </xsl:when>
173       <xsl:when test="id='org.bedework.client.error.unknown.user'">
174         Not found: the user <em><xsl:value-of select="param"/></em> was not found.
175       </xsl:when>
176       <xsl:when test="id='org.bedework.client.error.unknown.userid'">
177         Not found: there is no user identified by the id <em><xsl:value-of select="param"/></em>.
178       </xsl:when>
179       <xsl:when test="id='org.bedework.client.error.unknown.view'">
180         Not found: there is no view identified by the name <em><xsl:value-of select="param"/></em>.
181       </xsl:when>
182
183       <xsl:when test="id='org.bedework.client.error.viewnotadded'">
184         Error: the view was not added.
185       </xsl:when>
186
187       <!-- icalendar translation errors -->
188       <xsl:when test="id='org.bedework.exception.ical.noguid'">
189         An event must have a UID property.
190       </xsl:when>
191
192       <!-- Validation errors mostly dealing with incorrect or missing field values
193            that are explicitly under user control -->
194
195       <xsl:when test="id='org.bedework.validation.error.expectoneattendee'">
196         You must supply exactly one attendee.
197       </xsl:when>
198       <xsl:when test="id='org.bedework.validation.error.invalid.how'">
199         Error: bad ACL request (bad how setting).
200       </xsl:when>
201       <xsl:when test="id='org.bedework.validation.error.invalid.whotype'">
202         Error: bad who type (user or group).
203       </xsl:when>
204       <xsl:when test="id='org.bedework.validation.error.invalid.attendee'">
205           The attendee uri is invalid
206       </xsl:when>
207       <xsl:when test="id='org.bedework.validation.error.invalid.date'">
208           Bad or out-of-range date.
209       </xsl:when>
210       <xsl:when test="id='org.bedework.validation.error.invalid.duration'">
211         <em>Invalid duration</em> - you may not have a zero-length duration
212         for an all day event.
213       </xsl:when>
214       <xsl:when test="id='org.bedework.validation.error.invalid.endtype'">
215         The endtype <em><xsl:value-of select="param"/></em> is invalid.
216       </xsl:when>
217       <xsl:when test="id='org.bedework.validation.error.invalid.organizer'">
218           The organizer uri is invalid
219       </xsl:when>
220       <xsl:when test="id='org.bedework.validation.error.invalid.invalidschedulingobject'">
221           Cannot change this into a scheduling message
222       </xsl:when>
223       <xsl:when test="id='org.bedework.validation.error.invalid.prefendtype'">
224         The preferred endtype <em><xsl:value-of select="param"/></em> is invalid.
225       </xsl:when>
226       <xsl:when test="id='org.bedework.validation.error.invalid.prefusermode'">
227         The preferred user mode <em><xsl:value-of select="param"/></em> is invalid.
228       </xsl:when>
229       <xsl:when test="id='org.bedework.validation.error.invalid.prefworkdayend'">
230         Error: invalid working days end: <em><xsl:value-of select="param"/></em>
231       </xsl:when>
232       <xsl:when test="id='org.bedework.validation.error.invalid.prefworkdays'">
233         Error: invalid working days: start after end
234       </xsl:when>
235       <xsl:when test="id='org.bedework.validation.error.invalid.prefworkdaystart'">
236         Error: invalid working days start: <em><xsl:value-of select="param"/></em>
237       </xsl:when>
238       <xsl:when test="id='org.bedework.validation.error.invalid.recipient'">
239           The recipient uri is invalid
240       </xsl:when>
241       <xsl:when test="id='org.bedework.validation.error.invalid.recurcount'">
242         Error: bad value for recurrence count: <em><xsl:value-of select="param"/></em>
243       </xsl:when>
244       <xsl:when test="id='org.bedework.validation.error.invalid.recurcountanduntil'">
245         Error: Cannot specify count and until for recurrence
246       </xsl:when>
247       <xsl:when test="id='org.bedework.validation.error.invalid.recurinterval'">
248         Error: bad value for recurrence interval: <em><xsl:value-of select="param"/></em>
249       </xsl:when>
250       <xsl:when test="id='org.bedework.validation.error.invalid.recurrule'">
251         Error: bad recurrence rule: <em><xsl:value-of select="param"/></em>
252       </xsl:when>
253       <xsl:when test="id='org.bedework.validation.error.invalid.recuruntil'">
254         Error: bad value for recurrence until: <em><xsl:value-of select="param"/></em>
255       </xsl:when>
256       <xsl:when test="id='org.bedework.validation.error.cannot.change.method'">
257         Error: you cannot change scheduling method
258       </xsl:when>
259       <xsl:when test="id='org.bedework.validation.error.insubmissionscalendar'">
260         To publish this event, you must move it to a public calendar.  Please select a different calendar.
261       </xsl:when>
262
263       <!-- Scheduling error codes are defined in CalfacadeException -->
264
265       <xsl:when test="id='org.bedework.error.scheduling.attendeeaccessdisallowed'">
266          Error: Access is disallowed to one or more attendees.
267       </xsl:when>
268
269       <xsl:when test="id='org.bedework.error.scheduling.badttendees'">
270          Error: Attendee bad
271       </xsl:when>
272
273       <xsl:when test="id='org.bedework.error.scheduling.badmethod'">
274         Error: bad scheduling method (should be request or publish).
275       </xsl:when>
276
277       <xsl:when test="id='org.bedework.error.scheduling.badresponsemethod'">
278         Error: bad scheduling method for response (should be request or publish).
279       </xsl:when>
280
281       <xsl:when test="id='org.bedework.error.scheduling.badsourcecalendar'">
282          Error: event is not in inbox
283       </xsl:when>
284
285       <xsl:when test="id='org.bedework.error.scheduling.duplicateuid'">
286          Error: Duplicate uid found in the target calendar
287       </xsl:when>
288
289       <xsl:when test="id='org.bedework.error.scheduling.expectoneattendee'">
290          Error: Expected exactly one attendee for reply
291       </xsl:when>
292
293       <xsl:when test="id='org.bedework.error.scheduling.invalidpartstatus'">
294         Error: bad scheduling participation status
295       </xsl:when>
296
297       <xsl:when test="id='org.bedework.error.scheduling.multipleevents'">
298          Error: Multiple events were found in the target calendar
299       </xsl:when>
300
301       <xsl:when test="id='org.bedework.error.scheduling.noattendees'">
302          Error: Entity required attendees but had none.
303       </xsl:when>
304
305       <xsl:when test="id='org.bedework.error.scheduling.noOriginator'">
306          Error: Entity required originator but had none.
307       </xsl:when>
308
309       <xsl:when test="id='org.bedework.error.scheduling.norecipients'">
310          Error: Entity required recipients but had none.
311       </xsl:when>
312
313       <xsl:when test="id='org.bedework.error.scheduling.notattendee'">
314          Error: You are not an attendee of this meeting.
315       </xsl:when>
316
317       <xsl:when test="id='org.bedework.error.scheduling.unknownattendee'">
318          Error: Attendee for reply not in event.
319       </xsl:when>
320
321       <xsl:when test="id='org.bedework.error.scheduling.unknownevent'">
322         Error: Unknown event - organizer possibly deleted it?
323       </xsl:when>
324
325       <!--         End of scheduling            -->
326
327       <!--             Filters            -->
328
329       <xsl:when test="id='org.bedework.client.error.badfilter'">
330         Error: invalid filter definition: <em><xsl:value-of select="param"/></em>
331       </xsl:when>
332       <xsl:when test="id='org.bedework.client.error.badvpath'">
333         Error: bad virtual path: <em><xsl:value-of select="param"/></em>
334       </xsl:when>
335       <xsl:when test="id='org.bedework.client.error.unknown.filter'">
336         Error: unknown filter:  <em><xsl:value-of select="param"/></em>.
337       </xsl:when>
338       <xsl:when test="id='org.bedework.exception.filter.unexpected.eof'">
339         Filter error: Unexpected eof while parsing
340       </xsl:when>
341       <xsl:when test="id='org.bedework.exception.filter.expected.word'">
342         Filter error: expected a word found <em><xsl:value-of select="param"/></em>.
343       </xsl:when>
344       <xsl:when test="id='org.bedework.exception.filter.expected.openparen'">
345         Filter error: expected open paren
346       </xsl:when>
347       <xsl:when test="id='org.bedework.exception.filter.mixedlogicaloperators'">
348         Filter error: Cannot mix logical operators
349       </xsl:when>
350       <xsl:when test="id='org.bedework.exception.unknown.property'">
351         Filter error: unknown property <em><xsl:value-of select="param"/></em>.
352       </xsl:when>
353       <xsl:when test="id='org.bedework.exception.filter.badproperty'">
354         Filter error: Bad property value <em><xsl:value-of select="param"/></em>.
355       </xsl:when>
356       <xsl:when test="id='org.bedework.exception.filter.badoperator'">
357         Filter error: Bad operator <em><xsl:value-of select="param"/></em>.
358       </xsl:when>
359       <xsl:when test="id='org.bedework.exception.filter.syntax'">
360         Filter error: Syntax error
361       </xsl:when>
362       <xsl:when test="id='org.bedework.exception.filter.typeneedsand'">
363         Filter error: Type requires andop
364       </xsl:when>
365       <xsl:when test="id='org.bedework.exception.filter.badtype'">
366         Filter error: Bad type value <em><xsl:value-of select="param"/></em>.
367       </xsl:when>
368       <xsl:when test="id='org.bedework.exception.filter.typefirst'">
369         Filter error: Type must come first
370       </xsl:when>
371
372       <!--         End of filters            -->
373
374       <!-- Other error codes defined in CalfacadeException -->
375
376       <xsl:when test="id='org.bedework.exception.duplicatecalendar'">
377          Error: Duplicate calendar: <em><xsl:value-of select="param"/></em>
378       </xsl:when>
379
380       <xsl:when test="id='org.bedework.validation.error.invalid.status'">
381         Error: Invalid status: <em><xsl:value-of select="param"/></em>
382       </xsl:when>
383       <xsl:when test="id='org.bedework.validation.error.invalid.transparency'">
384         Error: Invalid transparency: <em><xsl:value-of select="param"/></em>
385       </xsl:when>
386       <xsl:when test="id='org.bedework.validation.error.invalid.uri'">
387         Error: Invalid URI: <em><xsl:value-of select="param"/></em>
388       </xsl:when>
389       <xsl:when test="id='org.bedework.validation.error.invalid.user'">
390         Error: Invalid user: <em><xsl:value-of select="param"/></em>
391       </xsl:when>
392
393       <xsl:when test="id='org.bedework.validation.error.missinghow'">
394         Error: missing how.
395       </xsl:when>
396
397       <xsl:when test="id='org.bedework.validation.error.missingwho'">
398         Error: missing who (principal name).
399       </xsl:when>
400
401       <xsl:when test="id='org.bedework.validation.error.missingaddress'">
402         Your information is incomplete: please supply an address.
403       </xsl:when>
404
405       <xsl:when test="id='org.bedework.validation.error.missingcalendar'">
406         Your information is incomplete: please supply a calendar.
407       </xsl:when>
408
409       <xsl:when test="id='org.bedework.validation.error.missingtopicalarea'">
410         Your information is incomplete: please supply at least one topical area.
411       </xsl:when>
412
413       <xsl:when test="id='org.bedework.validation.error.missingcalendarpath'">
414         Your information is incomplete: please supply a calendar path.
415       </xsl:when>
416
417       <xsl:when test="id='org.bedework.validation.error.missingcalsuitecalendar'">
418         Your information is incomplete: please supply a root calendar path.
419       </xsl:when>
420
421       <xsl:when test="id='org.bedework.validation.error.missingcategorykeyword'">
422         Your information is incomplete: please supply a category keyword.
423       </xsl:when>
424
425       <xsl:when test="id='org.bedework.validation.error.missingcontact'">
426         Your information is incomplete: please supply a contact.
427       </xsl:when>
428
429       <xsl:when test="id='org.bedework.validation.error.missingcontactname'">
430         You must enter a contact <em>name</em>.
431       </xsl:when>
432
433       <xsl:when test="id='org.bedework.validation.error.missingdescription'">
434         Your information is incomplete: please supply a description.
435       </xsl:when>
436
437       <xsl:when test="id='org.bedework.validation.error.missingeventowner'">
438         Your information is incomplete: please supply an event owner.
439       </xsl:when>
440
441       <xsl:when test="id='org.bedework.validation.error.missingfilterdef'">
442         Your information is incomplete: please supply a filter definition.
443       </xsl:when>
444
445       <xsl:when test="id='org.bedework.validation.error.missinggroupname'">
446         Your information is incomplete: please supply a group name.
447       </xsl:when>
448
449       <xsl:when test="id='org.bedework.validation.error.missinggroupowner'">
450         Your information is incomplete: please supply a group owner.
451       </xsl:when>
452
453       <xsl:when test="id='org.bedework.validation.error.missinglocation'">
454         Your information is incomplete: please supply a location.
455       </xsl:when>
456
457       <xsl:when test="id='org.bedework.validation.error.missingname'">
458         Your information is incomplete: please supply a name.
459       </xsl:when>
460
461       <xsl:when test="id='org.bedework.validation.error.missingorganizer'">
462         Your event is missing the organizer
463       </xsl:when>
464
465       <xsl:when test="id='org.bedework.validation.error.missingoriginator'">
466         Your event is missing the originator
467       </xsl:when>
468
469       <xsl:when test="id='org.bedework.validation.error.missingrecipients'">
470         You must supply a recipient.
471       </xsl:when>
472
473       <xsl:when test="id='org.bedework.validation.error.missingsubscriptionid'">
474         Your information is incomplete: please supply a subscription id.
475       </xsl:when>
476
477       <xsl:when test="id='org.bedework.exception.duplicatesubscription'">
478         Error: duplicate subscription.
479       </xsl:when>
480
481       <xsl:when test="id='org.bedework.validation.error.missingtitle'">
482         Your information is incomplete: please supply a title.
483       </xsl:when>
484
485       <xsl:when test="id='org.bedework.validation.error.missingsuburi'">
486         Your information is incomplete: please supply a uri for the subscription.
487       </xsl:when>
488
489       <xsl:when test="id='org.bedework.validation.error.startafterend'">
490         The <em>end date</em> occurs before the <em>start date</em>.
491       </xsl:when>
492
493       <xsl:when test="id='org.bedework.validation.error.toolong.description'">
494         Your description is too long.  Please limit your entry to
495           characters.  You may also wish to
496           point the event entry at a supplemental web page by entering a <em>URL</em>.
497       </xsl:when>
498
499       <xsl:when test="id='org.bedework.validation.error.toolong.name'">
500         Your name is too long.  Please limit your entry to
501       </xsl:when>
502
503       <xsl:when test="id='org.bedework.validation.error.toolong.summary'">
504         Your summary is too long.  Please limit your entry to
505           characters.  You may also wish to
506           point the event entry at a supplemental web page by entering a <em>URL</em>.
507       </xsl:when>
508       <xsl:otherwise>
509         <xsl:value-of select="id"/> = <xsl:value-of select="param"/>
510       </xsl:otherwise>
511     </xsl:choose>
512   </xsl:template>
513 </xsl:stylesheet>
514
Note: See TracBrowser for help on using the browser.