-
Notifications
You must be signed in to change notification settings - Fork 0
/
opensearch.rng
665 lines (604 loc) · 25.6 KB
/
opensearch.rng
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
<?xml version="1.0" encoding="UTF-8"?>
<!-- Document: opensearch.rng
OpenSearch description document の検査を行う
Metadata:
id - 8a026478-d66e-4ac8-baeb-2b957a21429e
author - <qq542vev at https://purl.org/meta/me/>
version - 0.1.0
date - 2022-11-13
since - 2022-11-13
copyright - Copyright (C) 2022-2022 qq542vev. Some rights reserved.
license - <CC-BY at https://creativecommons.org/licenses/by/4.0/>
package - shell-opensearch
See Also:
* <Project homepage at https://github.com/qq542vev/shell-opensearch>
* <Bag report at https://github.com/qq542vev/shell-opensearch/issues>
-->
<grammar
xmlns="http://relaxng.org/ns/structure/1.0"
xmlns:a="http://relaxng.org/ns/annotation/0.9"
ns="http://a9.com/-/spec/opensearch/1.1/"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
>
<!-- see: https://github.com/dewitt/opensearch/blob/master/opensearch-1-1-draft-6.md -->
<a:documentation xml:lang="en">
This document defines the OpenSearch description document, the OpenSearch Query element, the OpenSearch URL template syntax, and the OpenSearch response elements. Collectively these formats may be referred to as "OpenSearch 1.1" or simply "OpenSearch".
Search clients can use OpenSearch description documents to learn about the public interface of a search engine. These description documents contain parameterized URL templates that indicate how the search client should make search requests. Search engines can use the OpenSearch response elements to add search metadata to results in a variety of content formats.
</a:documentation>
<start>
<a:documentation xml:lang="en">
An OpenSearch description document can be used to describe the web interface of a search engine.
</a:documentation>
<ref name="opensearch.element.OpenSearchDescription"/>
</start>
<define name="opensearch.element.OpenSearchDescription">
<element name="OpenSearchDescription">
<a:documentation xml:lang="en">
The root node of the OpenSearch description document.
</a:documentation>
<interleave>
<ref name="opensearch.element.ShortName"/>
<ref name="opensearch.element.Description"/>
<oneOrMore>
<ref name="opensearch.element.Url"/>
</oneOrMore>
<optional>
<ref name="opensearch.element.Contact"/>
</optional>
<optional>
<ref name="opensearch.element.Tags"/>
</optional>
<optional>
<ref name="opensearch.element.LongName"/>
</optional>
<optional>
<ref name="opensearch.element.Developer"/>
</optional>
<optional>
<ref name="opensearch.element.Attribution"/>
</optional>
<optional>
<ref name="opensearch.element.SyndicationRight"/>
</optional>
<optional>
<ref name="opensearch.element.AdultContent"/>
</optional>
<zeroOrMore>
<choice>
<ref name="opensearch.element.Image"/>
<ref name="opensearch.element.Query"/>
<ref name="opensearch.element.Language"/>
<ref name="opensearch.element.InputEncoding"/>
<ref name="opensearch.element.OutputEncoding"/>
</choice>
</zeroOrMore>
<ref name="opensearch.content.exceptOpenSearchAttribute"/>
<ref name="opensearch.content.exceptOpenSearchElement"/>
</interleave>
</element>
</define>
<define name="opensearch.element.ShortName">
<element name="ShortName">
<a:documentation xml:lang="en">
Contains a brief human-readable title that identifies this search engine.
</a:documentation>
<ref name="opensearch.content.exceptOpenSearchAttribute"/>
<data type="string">
<a:documentation xml:lang="en">
The value must contain 16 or fewer characters of plain text. The value must not contain HTML or other markup.
</a:documentation>
<param name="maxLength">16</param>
</data>
</element>
</define>
<define name="opensearch.element.Description">
<element name="Description">
<a:documentation xml:lang="en">
Contains a human-readable text description of the search engine.
</a:documentation>
<ref name="opensearch.content.exceptOpenSearchAttribute"/>
<data type="string">
<a:documentation xml:lang="en">
The value must contain 1024 or fewer characters of plain text. The value must not contain HTML or other markup.
</a:documentation>
<param name="maxLength">1024</param>
</data>
</element>
</define>
<define name="opensearch.element.Url">
<element name="Url">
<a:documentation xml:lang="en">
Describes an interface by which a client can make requests for an external resource, such as search results, search suggestions, or additional description documents.
</a:documentation>
<ref name="opensearch.attribute.template"/>
<ref name="opensearch.attribute.type"/>
<zeroOrMore>
<choice>
<ref name="opensearch.attribute.rel"/>
<ref name="opensearch.attribute.indexOffset"/>
<ref name="opensearch.attribute.pageOffset"/>
</choice>
</zeroOrMore>
<ref name="opensearch.content.exceptOpenSearchAttribute"/>
<ref name="opensearch.content.exceptOpenSearchElement"/>
</element>
</define>
<define name="opensearch.element.Contact">
<element name="Contact">
<a:documentation xml:lang="en">
Contains an email address at which the maintainer of the description document can be reached.
</a:documentation>
<ref name="opensearch.content.exceptOpenSearchAttribute"/>
<data type="token">
<a:documentation xml:lang="en">
The value must conform to the requirements of Section 3.4.1 "Addr-spec specification" in RFC 2822.
</a:documentation>
<!-- see: http://www.din.or.jp/~ohzaki/mail_regex.htm#Simplify -->
<param name="pattern">([!#-'*+/-9=?A-Z\^_-~-]+(\.[!#-'*+/-9=?A-Z\^_-~-]+)*|"([!#-Z\[\]\^_-~]|\\[\t -~])*")@[!#-'*+/-9=?A-Z\^_-~-]+(\.[!#-'*+/-9=?A-Z\^_-~-]+)*</param>
<param name="maxLength">254</param>
</data>
</element>
</define>
<define name="opensearch.element.Tags">
<element name="Tags">
<a:documentation xml:lang="en">
Contains a set of words that are used as keywords to identify and categorize this search content. Tags must be a single word and are delimited by the space character (' ').
</a:documentation>
<ref name="opensearch.content.exceptOpenSearchAttribute"/>
<data type="token">
<a:documentation xml:lang="en">
The value must contain 256 or fewer characters of plain text. The value must not contain HTML or other markup.
</a:documentation>
<param name="maxLength">256</param>
</data>
</element>
</define>
<define name="opensearch.element.LongName">
<element name="LongName">
<a:documentation xml:lang="en">
Contains an extended human-readable title that identifies this search engine.
Search clients should use the value of the ShortName element if this element is not available. </a:documentation>
<ref name="opensearch.content.exceptOpenSearchAttribute"/>
<data type="string">
<a:documentation xml:lang="en">
The value must contain 48 or fewer characters of plain text. The value must not contain HTML or other markup.
</a:documentation>
<param name="maxLength">48</param>
</data>
</element>
</define>
<define name="opensearch.element.Image">
<element name="Image">
<a:documentation xml:lang="en">
Contains a URL that identifies the location of an image that can be used in association with this search content.
Image sizes are offered as a hint to the search client. The search client will choose the most appropriate image for the available space and should give preference to those listed first in the OpenSearch description document. Square aspect ratios are recommended. When possible, search engines should offer a 16x16 image of type "image/x-icon" or "image/vnd.microsoft.icon" (the Microsoft ICO format) and a 64x64 image of type "image/jpeg" or "image/png".
</a:documentation>
<zeroOrMore>
<choice>
<ref name="opensearch.attribute.height"/>
<ref name="opensearch.attribute.width"/>
<ref name="opensearch.attribute.type"/>
</choice>
</zeroOrMore>
<ref name="opensearch.content.exceptOpenSearchAttribute"/>
<data type="anyURI">
<a:documentation xml:lang="en">
The value must be a URI.
</a:documentation>
</data>
</element>
</define>
<define name="opensearch.element.Query">
<element name="Query">
<a:documentation xml:lang="en">
Defines a search query that can be performed by search clients. Please see the OpenSearch Query element specification for more information.
OpenSearch description documents should include at least one Query element of role="example" that is expected to return search results. Search clients may use this example query to validate that the search engine is working properly.
</a:documentation>
<ref name="opensearch.attribute.role"/>
<zeroOrMore>
<choice>
<ref name="opensearch.attribute.title"/>
<ref name="opensearch.attribute.totalResults"/>
<ref name="opensearch.attribute.searchTerms"/>
<ref name="opensearch.attribute.count"/>
<ref name="opensearch.attribute.startIndex"/>
<ref name="opensearch.attribute.startPage"/>
<ref name="opensearch.attribute.language"/>
<ref name="opensearch.attribute.inputEncoding"/>
<ref name="opensearch.attribute.outputEncoding"/>
</choice>
</zeroOrMore>
<ref name="opensearch.content.exceptOpenSearchAttribute"/>
<ref name="opensearch.content.exceptOpenSearchElement"/>
</element>
</define>
<define name="opensearch.element.Developer">
<element name="Developer">
<a:documentation xml:lang="en">
Contains the human-readable name or identifier of the creator or maintainer of the description document.
The developer is the person or entity that created the description document, and may or may not be the owner, author, or copyright holder of the source of the content itself.
</a:documentation>
<ref name="opensearch.content.exceptOpenSearchAttribute"/>
<data type="string">
<a:documentation xml:lang="en">
The value must contain 64 or fewer characters of plain text. The value must not contain HTML or other markup.
</a:documentation>
<param name="maxLength">64</param>
</data>
</element>
</define>
<define name="opensearch.element.Attribution">
<element name="Attribution">
<a:documentation xml:lang="en">
Contains a list of all sources or entities that should be credited for the content contained in the search feed.
</a:documentation>
<ref name="opensearch.content.exceptOpenSearchAttribute"/>
<data type="string">
<a:documentation xml:lang="en">
The value must contain 256 or fewer characters of plain text. The value must not contain HTML or other markup.
</a:documentation>
<param name="maxLength">256</param>
</data>
</element>
</define>
<define name="opensearch.element.SyndicationRight">
<element name="SyndicationRight">
<a:documentation xml:lang="en">
Contains a value that indicates the degree to which the search results provided by this search engine can be queried, displayed, and redistributed.
</a:documentation>
<ref name="opensearch.content.exceptOpenSearchAttribute"/>
<choice>
<a:documentation xml:lang="en">
The value must be one of the following strings (case insensitive):
</a:documentation>
<data type="token">
<param name="pattern">[Oo][Pp][Ee][Nn]</param>
</data>
<data type="token">
<param name="pattern">[Ll][Ii][Mm][Ii][Tt][Ee][Dd]</param>
</data>
<data type="token">
<param name="pattern">[Pp][Rr][Ii][Vv][Aa][Tt][Ee]</param>
</data>
<data type="token">
<param name="pattern">[Cc][Ll][Oo][Ss][Ee][Dd]</param>
</data>
</choice>
</element>
</define>
<define name="opensearch.element.AdultContent">
<element name="AdultContent">
<a:documentation xml:lang="en">
Contains a boolean value that should be set to true if the search results may contain material intended only for adults.
As there are no universally applicable guidelines as to what constitutes "adult" content, the search engine should make a good faith effort to indicate when there is a possibility that search results may contain material inappropriate for all audiences.
</a:documentation>
<ref name="opensearch.content.exceptOpenSearchAttribute"/>
<data type="string">
<a:documentation xml:lang="en">
The values "false", "FALSE", "0", "no", and "NO" will be considered boolean FALSE; all other strings will be considered boolean TRUE.
</a:documentation>
</data>
</element>
</define>
<define name="opensearch.element.Language">
<element name="Language">
<a:documentation xml:lang="en">
Contains a string that indicates that the search engine supports search results in the specified language
</a:documentation>
<ref name="opensearch.content.exceptOpenSearchAttribute"/>
<ref name="opensearch.datatype.language"/>
</element>
</define>
<define name="opensearch.element.InputEncoding">
<element name="InputEncoding">
<a:documentation xml:lang="en">
Contains a string that indicates that the search engine supports search requests encoded with the specified character encoding.
</a:documentation>
<ref name="opensearch.content.exceptOpenSearchAttribute"/>
<ref name="opensearch.datatype.encoding"/>
</element>
</define>
<define name="opensearch.element.OutputEncoding">
<element name="OutputEncoding">
<a:documentation xml:lang="en">
Contains a string that indicates that the search engine supports search responses encoded with the specified character encoding.
</a:documentation>
<ref name="opensearch.content.exceptOpenSearchAttribute"/>
<ref name="opensearch.datatype.encoding"/>
</element>
</define>
<define name="opensearch.element.totalResults">
<element name="totalResults">
<a:documentation xml:lang="en">
The number of search results available for the current search.
If the totalResults element does not appear on the page then the search client should consider the current page to be the last page of search results.
</a:documentation>
<ref name="opensearch.content.exceptOpenSearchAttribute"/>
<data type="nonNegativeInteger">
<a:documentation xml:lang="en">
The value must be a non-negative integer.
</a:documentation>
</data>
</element>
</define>
<define name="opensearch.element.startIndex">
<element name="startIndex">
<a:documentation xml:lang="en">
The index of the first search result in the current set of search results.
If the startIndex element does not appear on the page then the search client should consider the current page to be the first page of search results.
</a:documentation>
<ref name="opensearch.content.exceptOpenSearchAttribute"/>
<data type="integer">
<a:documentation xml:lang="en">
The value must an integer.
</a:documentation>
</data>
</element>
</define>
<define name="opensearch.element.itemsPerPage">
<element name="itemsPerPage">
<a:documentation xml:lang="en">
The number of search results returned per page.
If the itemsPerPage element does not appear on the page then the search client should use the number of items of the current page as the default page size.
</a:documentation>
<ref name="opensearch.content.exceptOpenSearchAttribute"/>
<data type="integer">
<a:documentation xml:lang="en">
The value must a non-negative integer.
</a:documentation>
</data>
</element>
</define>
<define name="opensearch.element.any">
<element>
<anyName/>
<ref name="opensearch.content.any"/>
</element>
</define>
<define name="opensearch.attribute.template">
<attribute name="template">
<a:documentation xml:lang="en">
The URL template to be processed according to the OpenSearch URL template syntax.
</a:documentation>
<data type="token">
<param name="pattern">([A-Za-z]|\{([!$&-.0-;=A-Z_a-z~]|%[0-9A-Fa-f]{2})*\??\})([A-Za-z0-9+.-]|\{([!$&-.0-;=A-Z_a-z~]|%[0-9A-Fa-f]{2})*\??\})*:(//(([!$&-.0-;=A-Z_a-z~]|%[0-9A-Fa-f]{2}|\{([!$&-.0-;=A-Z_a-z~]|%[0-9A-Fa-f]{2})*\??\})*@)?(\[(((([0-9A-F]{1,4}:){6}|::([0-9A-F]{1,4}:){5}|([0-9A-F]{1,4})?::([0-9A-F]{1,4}:){4}|(([0-9A-F]{1,4}:){0,1}[0-9A-F]{1,4})?::([0-9A-F]{1,4}:){3}|(([0-9A-F]{1,4}:){0,2}[0-9A-F]{1,4})?::([0-9A-F]{1,4}:){2}|(([0-9A-F]{1,4}:){0,3}[0-9A-F]{1,4})?::[0-9A-F]{1,4}:|(([0-9A-F]{1,4}:){0,4}[0-9A-F]{1,4})?::)([0-9A-F]{1,4}:[0-9A-F]{1,4}|(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))|(([0-9A-F]{1,4}:){0,5}[0-9A-F]{1,4})?::[0-9A-F]{1,4}|(([0-9A-F]{1,4}:){0,6}[0-9A-F]{1,4})?::)|v[0-9A-F]+\.[!$&-.0-;=A-Z_a-z~]+)\]|([A-Za-z0-9._~!$&'()*+,;=-]|%[0-9A-Fa-f]{2}|\{([!$&-.0-;=A-Z_a-z~]|%[0-9A-Fa-f]{2})*\??\})*)(:([0-9]|\{([!$&-.0-;=A-Z_a-z~]|%[0-9A-Fa-f]{2})*\??\})*)?(/([!$&-.0-;=@-Z_a-z~]|%[0-9A-Fa-f]{2}|\{([!$&-.0-;=A-Z_a-z~]|%[0-9A-Fa-f]{2})*\??\})*)*|/(([!$&-.0-;=@-Z_a-z~]|%[0-9A-Fa-f]{2}|\{([!$&-.0-;=A-Z_a-z~]|%[0-9A-Fa-f]{2})*\??\})+(/([!$&-.0-;=@-Z_a-z~]|%[0-9A-Fa-f]{2}|\{([!$&-.0-;=A-Z_a-z~]|%[0-9A-Fa-f]{2})*\??\})*)*)?|([!$&-.0-;=@-Z_a-z~]|%[0-9A-Fa-f]{2}|\{([!$&-.0-;=A-Z_a-z~]|%[0-9A-Fa-f]{2})*\??\})+(/([!$&-.0-;=@-Z_a-z~]|%[0-9A-Fa-f]{2}|\{([!$&-.0-;=A-Z_a-z~]|%[0-9A-Fa-f]{2})*\??\})*)*|)(\?([!$&-;=?-Z_a-z~]|%[0-9A-Fa-f]{2}|\{([!$&-.0-;=A-Z_a-z~]|%[0-9A-Fa-f]{2})*\??\})*)?(#([!$&-;=?-Z_a-z~]|%[0-9A-Fa-f]{2}|\{([!$&-.0-;=A-Z_a-z~]|%[0-9A-Fa-f]{2})*\??\})*)?</param>
</data>
</attribute>
</define>
<define name="opensearch.attribute.type">
<attribute name="type">
<a:documentation xml:lang="en">
The MIME type of the resource being described.
</a:documentation>
<data type="token">
<!-- see: https://stackoverflow.com/a/48046041 -->
<param name="pattern">(application|audio|font|example|image|message|model|multipart|text|video|x-[!#-'*+.0-9A-Z\^_-z|~-]+)/[!#-'*+.0-9A-Z\^_-z|~-]+([\t ]*;[\t ]*[!#-'*+.0-9A-Z\^_-z|~-]+=([!#-'*+.0-9A-Z\^_-z|~-]+|"([\t !#-Z\[\]\^_-~]|\\[\t -~])*"))*</param>
</data>
</attribute>
</define>
<define name="opensearch.attribute.rel">
<attribute name="rel" a:defaultValue="results">
<a:documentation xml:lang="en">
The role of the resource being described in relation to the description document.
</a:documentation>
<list>
<oneOrMore>
<choice>
<data type="NCName">
<param name="pattern">[a-z][a-z\-]+</param>
</data>
<data type="anyURI">
<param name="pattern">[A-Za-z][A-Za-z0-9+.-]*:.*</param>
</data>
</choice>
</oneOrMore>
</list>
</attribute>
</define>
<define name="opensearch.attribute.indexOffset">
<attribute name="indexOffset" a:defaultValue="1">
<a:documentation xml:lang="en">
The index number of the first search result.
</a:documentation>
<data type="integer"/>
</attribute>
</define>
<define name="opensearch.attribute.pageOffset">
<attribute name="pageOffset" a:defaultValue="1">
<a:documentation xml:lang="en">
The page number of the first set of search results.
</a:documentation>
<data type="integer"/>
</attribute>
</define>
<define name="opensearch.attribute.height">
<attribute name="height">
<a:documentation xml:lang="en">
Contains the height, in pixels, of this image.
</a:documentation>
<data type="nonNegativeInteger"/>
</attribute>
</define>
<define name="opensearch.attribute.width">
<attribute name="width">
<a:documentation xml:lang="en">
Contains the width, in pixels, of this image.
</a:documentation>
<data type="nonNegativeInteger"/>
</attribute>
</define>
<define name="opensearch.attribute.role">
<attribute name="role">
<a:documentation xml:lang="en">
Contains a string identifying how the search client should interpret the search request defined by this Query element.
</a:documentation>
<choice>
<a:documentation xml:lang="en">
A role value consists of an optional prefix followed by the local role value. If the prefix is present it will be separated from the local role value with the ":" character. All role values are associated with a namespace, either implicitly in the case of local role values, or explicitly via a prefix in the case of fully qualified role values.
</a:documentation>
<div>
<a:documentation xml:lang="en">
Local role values are not preceded by a prefix. Local role values are associated with the OpenSearch 1.1 namespace.
The following role values are identified with the OpenSearch 1.1 namespace. The list is exhaustive; only the role values listed below may appear in the OpenSearch 1.1 namespace.
</a:documentation>
<value>request</value>
<value>example</value>
<value>related</value>
<value>correction</value>
<value>subset</value>
<value>superset</value>
</div>
<data type="QName">
<a:documentation xml:lang="en">
Fully qualified role values are preceded by a prefix. Fully qualified role values are associated with the namespace identified by the prefix on the containing Query element or ancestor elements.
</a:documentation>
<param name="pattern">.*:.*</param>
</data>
</choice>
</attribute>
</define>
<define name="opensearch.attribute.title">
<attribute name="title">
<a:documentation xml:lang="en">
Contains a human-readable plain text string describing the search request.
</a:documentation>
<data type="string">
<param name="maxLength">256</param>
</data>
</attribute>
</define>
<define name="opensearch.attribute.totalResults">
<attribute name="totalResults">
<a:documentation xml:lang="en">
Contains the expected number of results to be found if the search request were made.
</a:documentation>
<data type="nonNegativeInteger"/>
</attribute>
</define>
<define name="opensearch.attribute.searchTerms">
<attribute name="searchTerms">
<a:documentation xml:lang="en">
Contains the value representing the searchTerms as a OpenSearch 1.1 parameter names.
</a:documentation>
</attribute>
</define>
<define name="opensearch.attribute.count">
<attribute name="count">
<a:documentation xml:lang="en">
Contains the value representing the count as a OpenSearch 1.1 parameter names.
</a:documentation>
<data type="nonNegativeInteger"/>
</attribute>
</define>
<define name="opensearch.attribute.startIndex">
<attribute name="startIndex">
<a:documentation xml:lang="en">
Contains the value representing the startIndex as an OpenSearch 1.1 parameter names.
</a:documentation>
<data type="integer"/>
</attribute>
</define>
<define name="opensearch.attribute.startPage">
<attribute name="startPage">
<a:documentation xml:lang="en">
Contains the value representing the startPage as an OpenSearch 1.1 parameter names.
</a:documentation>
<data type="integer"/>
</attribute>
</define>
<define name="opensearch.attribute.language">
<attribute name="language">
<a:documentation xml:lang="en">
Contains the value representing the language as an OpenSearch 1.1 parameter names.
</a:documentation>
<ref name="opensearch.datatype.language"/>
</attribute>
</define>
<define name="opensearch.attribute.inputEncoding">
<attribute name="inputEncoding">
<a:documentation xml:lang="en">
Contains the value representing the inputEncoding as an OpenSearch 1.1 parameter names.
</a:documentation>
<ref name="opensearch.datatype.encoding"/>
</attribute>
</define>
<define name="opensearch.attribute.outputEncoding">
<attribute name="outputEncoding">
<a:documentation xml:lang="en">
Contains the value representing the outputEncoding as an OpenSearch 1.1 parameter names.
</a:documentation>
<ref name="opensearch.datatype.encoding"/>
</attribute>
</define>
<define name="opensearch.attribute.any">
<attribute>
<anyName/>
</attribute>
</define>
<define name="opensearch.datatype.language">
<choice>
<a:documentation xml:lang="en">
The value must conform to the XML 1.0 Language Identification, as specified by RFC 5646. In addition, the value of "*" will signify that the search engine does not restrict search results to any particular language.
</a:documentation>
<data type="language"/>
<value>*</value>
</choice>
</define>
<define name="opensearch.datatype.encoding">
<data type="token">
<a:documentation xml:lang="en">
The value must conform to the XML 1.0 Character Encodings, as specified by the IANA Character Set Assignments.
</a:documentation>
<!-- see: http://www.w3.org/TR/2004/REC-xml-20040204/#charencoding -->
<param name="pattern">[A-Za-z][A-Za-z0-9._-]*</param>
</data>
</define>
<define name="opensearch.content.response">
<a:documentation xml:lang="en">
The OpenSearch response elements can be used by search engines to augment existing XML formats with search-related metadata.
OpenSearch response elements are typically found augmenting search results returned in list-based XML syndication formats, such as RSS 2.0 and Atom 1.0, but may be used in other contexts without restriction.
</a:documentation>
<optional>
<ref name="opensearch.element.totalResults"/>
</optional>
<optional>
<ref name="opensearch.element.startIndex"/>
</optional>
<optional>
<ref name="opensearch.element.itemsPerPage"/>
</optional>
</define>
<define name="opensearch.content.exceptOpenSearchElement">
<zeroOrMore>
<element>
<anyName>
<except>
<nsName/>
</except>
</anyName>
<ref name="opensearch.content.any"/>
</element>
</zeroOrMore>
</define>
<define name="opensearch.content.exceptOpenSearchAttribute">
<zeroOrMore>
<attribute>
<anyName>
<except>
<nsName/>
<nsName ns=""/>
</except>
</anyName>
</attribute>
</zeroOrMore>
</define>
<define name="opensearch.content.any">
<zeroOrMore>
<choice>
<ref name="opensearch.attribute.any"/>
<ref name="opensearch.element.any"/>
<text/>
</choice>
</zeroOrMore>
</define>
</grammar>