Implement MachineKey.Protect and MachineKey.Unprotect
[mono.git] / mcs / class / System.Web / UplevelHelperDefinitions.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3 Browser data from http://www.seehowitruns.org/
4
5 The purpose of this file is to describe, in the shortest possible way,
6 the browsers that have support for JavaScript. Since it is not
7 possible to determine in 100% if a visiting browser has support for
8 JavaScript we are left with our best guess based on the User-Agent
9 header contents. Note that the header may, of course, be faked and
10 completely bogus - thus we do not have to go out of our way in order
11 to be 100% correct and accurate.
12 The important thing to remember about this file before adding any
13 entries to it is that it serves the purpose of finding BROWSERS that
14 DO support JavaScript and not blocking bots etc. that do NOT support
15 JavaScript.
16 The file should be kept as short as possible, because that way the
17 matching we need to do at the beginning of every request will be fast
18 (the entries contained below define 99% of the cases and the generated
19 code is able to match nearly 90000 lines of unique browser strings in
20 under 0.015s).
21
22 The syntax is simple:
23
24 1. Two tags are supported: group and except
25
26 1a. The <group> tag
27
28   The tag takes several attributes:
29
30   - positions
31     Specifies a section of the User-Agent string which should be
32     probed for match. Syntax:
33
34       X[-Y][,X[-Y]] ...
35
36     where both X and Y are digits. Positions are _zero based_
37     (i.e. the first character of the User-Agent string is at position
38     0). Several position ranges can be specified, they must be
39     separated with a comma.
40     Generated code checks the U-A string only at the specified
41     positions.
42
43   - scanfrom
44     Specifies an index in the User-Agent string from which the code
45     should scan for the value specified in the 'match' attribute.
46     Generated code scans the U-A string from this position, moving one
47     position ahead with each iteration and trying to match the
48     specified value starting from each position.
49
50 NOTE: 'positions' and 'scanfrom' cannot be specified together and one
51 of them must be specified in order for the compiler to process the
52 definition correctly.
53
54   - skip
55     Specifies the number of initial positions to skip when 'scanfrom'
56     is used. It is a bit superfluous, as it would be possible to
57     specify 'scanfrom' taking the offset into account, but the idea is
58     that the definition editor can see the whole context when given
59     the "absolute start" and the offset while looking at the agent
60     string.
61  
62   - match
63     Specifies the string to look for in the U-A header. Used with both
64     'scanfrom' and 'positions' attributes. The difference is that with
65     'positions' match *MUST* contain the same number of of parts as
66     the 'position' attribute (also separated by commas). Also in the
67     'positions' case, match parts must be equal in length to the
68     specified 'positions' ranges.
69     This attribute is always required.
70
71   - javascript
72     Specifies the default return value of the group. Defaults to
73     'false'.
74
75 1b. The 'except' tag
76   Defines an exception to the default return value of the group it is
77   defined in. The attributes are the same what in the 'group' tag
78   above. When a match is made on the 'except' clause, the return value
79   is reverse to the group default.
80   Exceptions are rendered _before_ the subgroups.
81
82 2. Overall syntax
83   The 'group' container tags can be nested to any depth and can
84   also contain the 'except' tags.
85   The 'except' tags can be specified only within a group.
86   Unknown tags are silently ignored.
87
88 -->
89 <uplevel>
90   <group positions="0-3" match="Mozi">
91     <!-- Mozilla and compatibles -->
92     <group positions="7-10" match="/4.0" javascript="true">
93       <!-- MSIE, Netscape 4.0, Opera -->
94       <except positions="13-28" match="ActiveTouristBot"/>
95     </group>
96
97     <group scanfrom="12" skip="4" match=") Gecko/" javascript="true">
98       <!-- All the Gecko-based browsers -->
99     </group>
100
101     <group scanfrom="12" skip="4" match=") Opera" javascript="true">
102       <!-- Opera -->
103     </group>
104
105     <group positions="12-15" match="(Mac" javascript="true">
106       <!-- Safari -->
107     </group>
108
109     <group scanfrom="12" skip="2" match="(KHTML" javascript="true">
110       <!-- Safari -->
111     </group>
112
113     <group positions="12-15" match="Gale" javascript="true">
114       <!-- Galeon < 2.0 -->
115     </group>
116     
117     <group positions="25-28" match="Konq" javascript="true">
118       <!-- Konqueror -->
119     </group>
120
121     <group positions="9-11,12" match="/4.,[" javascript="true">
122       <!-- Netscape 4.x -->
123     </group>
124   </group>
125
126   <group positions="0-3" match="Konq" javascript="true">
127     <!-- Konqueror -->
128   </group>
129
130   <group positions="0-3" match="Oper" javascript="true">
131     <!-- Opera -->
132   </group>
133 </uplevel>