root/trunk/deployment/resources/xsl/default/default/errors.xsl

Revision 1170 (checked in by douglm, 6 years ago)

Little functional change here.

Created definitions for all error codes generated by the web code.
Created new errors.xsl common to all web apps
Copy dojo code into new common web directory for inclusion by web apps.
Copy new errors.xsl into same directory.

Delete all old errors.xsl

  • 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
14       <!-- client.error messages generally do not quite constitute validation errors
15            which mostly involve changing a field content.
16            Usually when we flag a data error here, it is due to a bug in the xsl -->
17       <xsl:when test="id='org.bedework.client.error.alreadymember'">
18         Error: already a member: <em><xsl:value-of select="param"/></em>
19       </xsl:when>
20       <xsl:when test="id='org.bedework.client.error.badinterval'">
21         Error: bad interval.
22       </xsl:when>
23       <xsl:when test="id='org.bedework.client.error.badintervalunit'">
24         Error: bad interval unit.
25       </xsl:when>
26       <xsl:when test="id='org.bedework.client.error.badrequest'">
27         Error: Bad request.
28       </xsl:when>
29       <xsl:when test="id='org.bedework.client.error.badschedulewhat'">
30         Error: Bad scheduling what parameter.
31       </xsl:when>
32       <xsl:when test="id='org.bedework.client.error.calsuitenotadded'">
33         Error: calendar suite not added.
34       </xsl:when>
35       <xsl:when test="id='org.bedework.client.error.cannotchangecalmode'">
36         Forbidden: you are not allowed to change the mode of the non-empty
37         collection <em><xsl:value-of select="param"/></em>.
38       </xsl:when>
39       <xsl:when test="id='org.bedework.client.error.choosegroupsuppressed'">
40         Error: choose group is suppressed.  You cannot perform that action at this time.
41       </xsl:when>
42       <xsl:when test="id='org.bedework.client.error.duplicatecontact'">
43         Cannot add: the contact already exists.
44       </xsl:when>
45       <xsl:when test="id='org.bedework.client.error.duplicategroup'">
46         Error: duplicate group.  <em><xsl:value-of select="param"/></em> already exists.
47       </xsl:when>
48       <xsl:when test="id='org.bedework.client.error.duplicatelocation'">
49         Cannot add: the location already exists.
50       </xsl:when>
51       <xsl:when test="id='org.bedework.client.error.duplicateuid'">
52           Duplicate uid: this event already exists in this calendar.
53       </xsl:when>
54       <xsl:when test="id='org.bedework.client.error.failed.overrides'">
55           Error: there were <xsl:value-of select="param"/> failed overrides.
56       </xsl:when>
57       <xsl:when test="id='org.bedework.client.error.mail.norecipient'">
58         Error: the email has no recipient.
59       </xsl:when>
60       <xsl:when test="id='org.bedework.client.error.missingcalendarpath'">
61         Error: missing calendar path.
62       </xsl:when>
63       <xsl:when test="id='org.bedework.client.error.missingeventkeyfields'">
64         Error: missing event key fields
65       </xsl:when>
66       <xsl:when test="id='org.bedework.client.error.missingfilename'">
67           You must supply a file name (required).
68       </xsl:when>
69       <xsl:when test="id='org.bedework.client.error.missingrequestpar'">
70           Missing request parameter: <em><xsl:value-of select="param"/></em>.
71       </xsl:when>
72       <xsl:when test="id='org.bedework.client.error.missingschedulewhat'">
73         Error: Missing scheduling what parameter.
74       </xsl:when>
75       <xsl:when test="id='org.bedework.client.error.multipleevents'">
76         System Error: Multiple events when one expected.
77       </xsl:when>
78       <xsl:when test="id='org.bedework.client.error.noaccess'">
79         Error: no access.
80       </xsl:when>
81       <xsl:when test="id='org.bedework.client.error.nodefaultview'">
82           No default view defined
83       </xsl:when>
84       <xsl:when test="id='org.bedework.client.error.noschedulingaccess'">
85           You cannot schedule events with user <em><xsl:value-of select="param"/></em>.
86       </xsl:when>
87       <xsl:when test="id='org.bedework.client.error.ongrouppath'">
88         Error: group may not be added to itself.
89       </xsl:when>
90       <xsl:when test="id='org.bedework.client.error.onlyfrominbox'">
91         You can only respond from your inbox.
92       </xsl:when>
93       <xsl:when test="id='org.bedework.client.error.onlytoinbox'">
94         You can only reply to an inbox.
95       </xsl:when>
96       <xsl:when test="id='org.bedework.client.error.referenced.calendar'">
97         Cannot delete: the calendar is not empty.
98       </xsl:when>
99       <xsl:when test="id='org.bedework.client.error.referenced.category'">
100         Cannot delete: the category is referenced by events.
101       </xsl:when>
102       <xsl:when test="id='org.bedework.client.error.referenced.contact'">
103         Cannot delete: the contact is referenced by events.
104       </xsl:when>
105       <xsl:when test="id='org.bedework.client.error.referenced.location'">
106         Cannot delete: the location is referenced by events.
107       </xsl:when>
108       <xsl:when test="id='org.bedework.client.error.referenced.subscription'">
109         Cannot delete: the subscription is included in view <em><xsl:value-of select="param"/></em>.<br/>
110         You must remove the subscription from this view before deleting.
111       </xsl:when>
112       <xsl:when test="id='org.bedework.error.timezones.readerror'">
113         Timzone error: could not read file.
114       </xsl:when>
115
116       <!-- things we cannot find -->
117       <xsl:when test="id='org.bedework.client.error.unknown.attendee'">
118           Unknown attendee <em><xsl:value-of select="param"/></em>
119       </xsl:when>
120       <xsl:when test="id='org.bedework.client.error.unknown.calendar'">
121         Not found: there is no calendar with the path <em><xsl:value-of select="param"/></em>.
122       </xsl:when>
123       <xsl:when test="id='org.bedework.client.error.unknown.calendarsuite'">
124         There is no calendar suite with the name <em><xsl:value-of select="param"/></em>.
125       </xsl:when>
126       <xsl:when test="id='org.bedework.client.error.unknown.calendartype'">
127         System error: there is no calendar with the type <em><xsl:value-of select="param"/></em>.
128       </xsl:when>
129       <xsl:when test="id='org.bedework.client.error.unknown.category'">
130         Not found: there is no category with the keyword <em><xsl:value-of select="param"/></em>.
131       </xsl:when>
132       <xsl:when test="id='org.bedework.client.error.unknown.contact'">
133         Not found: there is no contact <em><xsl:value-of select="param"/></em>.
134       </xsl:when>
135       <xsl:when test="id='org.bedework.client.error.unknown.event'">
136           Event <xsl:value-of select="param"/> does not exist.
137       </xsl:when>
138       <xsl:when test="id='org.bedework.client.error.unknown.group'">
139         Error: unknown group:  <em><xsl:value-of select="param"/></em>.
140       </xsl:when>
141       <xsl:when test="id='org.bedework.client.error.unknown.location'">
142         Not found: there is no location identified by the id <em><xsl:value-of select="param"/></em>.
143       </xsl:when>
144       <xsl:when test="id='org.bedework.client.error.unknown.subscription'">
145         Not found: there is no user identified by the name <em><xsl:value-of select="param"/></em>.
146       </xsl:when>
147       <xsl:when test="id='org.bedework.client.error.unknown.user'">
148         Not found: the user <em><xsl:value-of select="param"/></em> was not found.
149       </xsl:when>
150       <xsl:when test="id='org.bedework.client.error.unknown.userid'">
151         Not found: there is no user identified by the id <em><xsl:value-of select="param"/></em>.
152       </xsl:when>
153       <xsl:when test="id='org.bedework.client.error.unknown.view'">
154         Not found: there is no view identified by the name <em><xsl:value-of select="param"/></em>.
155       </xsl:when>
156
157       <xsl:when test="id='org.bedework.client.error.viewnotadded'">
158         Error: the view was not added.
159       </xsl:when>
160
161       <!-- Validation errors mostly dealing with incorrect or missing field values
162            that are explicitly under user control -->
163
164       <xsl:when test="id='org.bedework.validation.error.expectoneattendee'">
165         You must supply exactly one attendee.
166       </xsl:when>
167       <xsl:when test="id='org.bedework.validation.error.invalid.how'">
168         Error: bad ACL request (bad how setting).
169       </xsl:when>
170       <xsl:when test="id='org.bedework.validation.error.invalid.whotype'">
171         Error: bad who type (user or group).
172       </xsl:when>
173       <xsl:when test="id='org.bedework.validation.error.invalid.attendee'">
174           The attendee uri is invalid
175       </xsl:when>
176       <xsl:when test="id='org.bedework.validation.error.invalid.date'">
177           Bad or out-of-range date.
178       </xsl:when>
179       <xsl:when test="id='org.bedework.validation.error.invalid.duration'">
180         <em>Invalid duration</em> - you may not have a zero-length duration
181         for an all day event.
182       </xsl:when>
183       <xsl:when test="id='org.bedework.validation.error.invalid.endtype'">
184         The endtype <em><xsl:value-of select="param"/></em> is invalid.
185       </xsl:when>
186       <xsl:when test="id='org.bedework.validation.error.invalid.organizer'">
187           The organizer uri is invalid
188       </xsl:when>
189       <xsl:when test="id='org.bedework.validation.error.invalid.prefendtype'">
190         The preferred endtype <em><xsl:value-of select="param"/></em> is invalid.
191       </xsl:when>
192       <xsl:when test="id='org.bedework.validation.error.invalid.prefusermode'">
193         The preferred user mode <em><xsl:value-of select="param"/></em> is invalid.
194       </xsl:when>
195       <xsl:when test="id='org.bedework.validation.error.invalid.prefworkdayend'">
196         Error: invalid working days end: <em><xsl:value-of select="param"/></em>
197       </xsl:when>
198       <xsl:when test="id='org.bedework.validation.error.invalid.prefworkdays'">
199         Error: invalid working days: start after end
200       </xsl:when>
201       <xsl:when test="id='org.bedework.validation.error.invalid.prefworkdaystart'">
202         Error: invalid working days start: <em><xsl:value-of select="param"/></em>
203       </xsl:when>
204       <xsl:when test="id='org.bedework.validation.error.invalid.recipient'">
205           The recipient uri is invalid
206       </xsl:when>
207       <xsl:when test="id='org.bedework.validation.error.invalid.recurcount'">
208         Error: bad value for recurrence count: <em><xsl:value-of select="param"/></em>
209       </xsl:when>
210       <xsl:when test="id='org.bedework.validation.error.invalid.recurcountanduntil'">
211         Error: Cannot specify count and until for recurrence
212       </xsl:when>
213       <xsl:when test="id='org.bedework.validation.error.invalid.recurinterval'">
214         Error: bad value for recurrence interval: <em><xsl:value-of select="param"/></em>
215       </xsl:when>
216       <xsl:when test="id='org.bedework.validation.error.invalid.recurrule'">
217         Error: bad recurrence rule: <em><xsl:value-of select="param"/></em>
218       </xsl:when>
219       <xsl:when test="id='org.bedework.validation.error.invalid.recuruntil'">
220         Error: bad value for recurrence until: <em><xsl:value-of select="param"/></em>
221       </xsl:when>
222
223       <xsl:when test="id='org.bedework.validation.error.invalid.schedmethod'">
224         Error: bad value for recurrence until: <em><xsl:value-of select="param"/></em>
225       </xsl:when>
226       <xsl:when test="id='org.bedework.validation.error.invalid.schedmethod'">
227         Error: bad scheduling method (should be request or publish).
228       </xsl:when>
229       <xsl:when test="id='org.bedework.validation.error.invalid.schedpartstatus'">
230         Error: bad scheduling part status
231       </xsl:when>
232       <xsl:when test="id='org.bedework.validation.error.invalid.schedreplymethod'">
233         Error: bad scheduling method (should be reply).
234       </xsl:when>
235       <xsl:when test="id='org.bedework.validation.error.invalid.schedrequestmethod'">
236         Error: bad scheduling method (should be request).
237       </xsl:when>
238       <xsl:when test="id='org.bedework.validation.error.invalid.schedrespondmethod'">
239         Error: bad scheduling method (should be COUNTER, REFRESH, REPLY).
240       </xsl:when>
241
242       <xsl:when test="id='org.bedework.validation.error.invalid.status'">
243         Error: Invalid status: <em><xsl:value-of select="param"/></em>
244       </xsl:when>
245       <xsl:when test="id='org.bedework.validation.error.invalid.transparency'">
246         Error: Invalid transparency: <em><xsl:value-of select="param"/></em>
247       </xsl:when>
248       <xsl:when test="id='org.bedework.validation.error.invalid.user'">
249         Error: Invalid user: <em><xsl:value-of select="param"/></em>
250       </xsl:when>
251
252       <xsl:when test="id='org.bedework.validation.error.missinghow'">
253         Error: missing how.
254       </xsl:when>
255
256       <xsl:when test="id='org.bedework.validation.error.missingwho'">
257         Error: missing who (principal name).
258       </xsl:when>
259
260       <xsl:when test="id='org.bedework.validation.error.missingaddress'">
261         Your information is incomplete: please supply an address.
262       </xsl:when>
263
264       <xsl:when test="id='org.bedework.validation.error.missingcalendar'">
265         Your information is incomplete: please supply a calendar.
266       </xsl:when>
267
268       <xsl:when test="id='org.bedework.validation.error.missingcalendarpath'">
269         Your information is incomplete: please supply a calendar path.
270       </xsl:when>
271
272       <xsl:when test="id='org.bedework.validation.error.missingcalsuitecalendar'">
273         Your information is incomplete: please supply a root calendar path.
274       </xsl:when>
275
276       <xsl:when test="id='org.bedework.validation.error.missingcategorykeyword'">
277         Your information is incomplete: please supply a category keyword.
278       </xsl:when>
279
280       <xsl:when test="id='org.bedework.validation.error.missingcontact'">
281         Your information is incomplete: please supply a contact.
282       </xsl:when>
283
284       <xsl:when test="id='org.bedework.validation.error.missingcontactname'">
285         You must enter a contact <em>name</em>.
286       </xsl:when>
287
288       <xsl:when test="id='org.bedework.validation.error.missingdescription'">
289         Your information is incomplete: please supply a description.
290       </xsl:when>
291
292       <xsl:when test="id='org.bedework.validation.error.missingeventowner'">
293         Your information is incomplete: please supply an event owner.
294       </xsl:when>
295
296       <xsl:when test="id='org.bedework.validation.error.missinggroupname'">
297         Your information is incomplete: please supply a group name.
298       </xsl:when>
299
300       <xsl:when test="id='org.bedework.validation.error.missinggroupowner'">
301         Your information is incomplete: please supply a group owner.
302       </xsl:when>
303
304       <xsl:when test="id='org.bedework.validation.error.missinglocation'">
305         Your information is incomplete: please supply a location.
306       </xsl:when>
307
308       <xsl:when test="id='org.bedework.validation.error.missingname'">
309         Your information is incomplete: please supply a name.
310       </xsl:when>
311
312       <xsl:when test="id='org.bedework.validation.error.missingoriginator'">
313         You event is missing the originator
314       </xsl:when>
315
316       <xsl:when test="id='org.bedework.validation.error.missingrecipients'">
317         You must supply a recipient.
318       </xsl:when>
319
320       <xsl:when test="id='org.bedework.validation.error.missingsubscriptionid'">
321         Your information is incomplete: please supply a subscription id.
322       </xsl:when>
323
324       <xsl:when test="id='org.bedework.validation.error.missingtitle'">
325         Your information is incomplete: please supply a title.
326       </xsl:when>
327
328       <xsl:when test="id='org.bedework.validation.error.missingsuburi'">
329         Your information is incomplete: please supply a uri for the subscription.
330       </xsl:when>
331
332       <xsl:when test="id='org.bedework.validation.error.startafterend'">
333         The <em>end date</em> occurs before the <em>start date</em>.
334       </xsl:when>
335
336       <xsl:when test="id='org.bedework.validation.error.toolong.description'">
337         Your description is too long.  Please limit your entry to
338           characters.  You may also wish to
339           point the event entry at a supplemental web page by entering a <em>URL</em>.
340       </xsl:when>
341
342       <xsl:when test="id='org.bedework.validation.error.toolong.name'">
343         Your name is too long.  Please limit your entry to
344       </xsl:when>
345
346       <xsl:when test="id='org.bedework.validation.error.toolong.summary'">
347         Your summary is too long.  Please limit your entry to
348           characters.  You may also wish to
349           point the event entry at a supplemental web page by entering a <em>URL</em>.
350       </xsl:when>
351       <xsl:otherwise>
352         <xsl:value-of select="id"/> = <xsl:value-of select="param"/>
353       </xsl:otherwise>
354     </xsl:choose>
355   </xsl:template>
356 </xsl:stylesheet>
357
Note: See TracBrowser for help on using the browser.