Welcome to mirror list, hosted at ThFree Co, Russian Federation.

UplevelHelperDefinitions.xml « System.Web « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5add6d9d453d4dbd10ee525613241406670e91ed (plain)
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
<?xml version="1.0" encoding="utf-8"?>
<!--
Browser data from http://www.seehowitruns.org/

The purpose of this file is to describe, in the shortest possible way,
the browsers that have support for JavaScript. Since it is not
possible to determine in 100% if a visiting browser has support for
JavaScript we are left with our best guess based on the User-Agent
header contents. Note that the header may, of course, be faked and
completely bogus - thus we do not have to go out of our way in order
to be 100% correct and accurate.
The important thing to remember about this file before adding any
entries to it is that it serves the purpose of finding BROWSERS that
DO support JavaScript and not blocking bots etc. that do NOT support
JavaScript.
The file should be kept as short as possible, because that way the
matching we need to do at the beginning of every request will be fast
(the entries contained below define 99% of the cases and the generated
code is able to match nearly 90000 lines of unique browser strings in
under 0.015s).

The syntax is simple:

1. Two tags are supported: group and except

1a. The <group> tag

  The tag takes several attributes:

  - positions
    Specifies a section of the User-Agent string which should be
    probed for match. Syntax:

      X[-Y][,X[-Y]] ...

    where both X and Y are digits. Positions are _zero based_
    (i.e. the first character of the User-Agent string is at position
    0). Several position ranges can be specified, they must be
    separated with a comma.
    Generated code checks the U-A string only at the specified
    positions.

  - scanfrom
    Specifies an index in the User-Agent string from which the code
    should scan for the value specified in the 'match' attribute.
    Generated code scans the U-A string from this position, moving one
    position ahead with each iteration and trying to match the
    specified value starting from each position.

NOTE: 'positions' and 'scanfrom' cannot be specified together and one
of them must be specified in order for the compiler to process the
definition correctly.

  - skip
    Specifies the number of initial positions to skip when 'scanfrom'
    is used. It is a bit superfluous, as it would be possible to
    specify 'scanfrom' taking the offset into account, but the idea is
    that the definition editor can see the whole context when given
    the "absolute start" and the offset while looking at the agent
    string.
 
  - match
    Specifies the string to look for in the U-A header. Used with both
    'scanfrom' and 'positions' attributes. The difference is that with
    'positions' match *MUST* contain the same number of of parts as
    the 'position' attribute (also separated by commas). Also in the
    'positions' case, match parts must be equal in length to the
    specified 'positions' ranges.
    This attribute is always required.

  - javascript
    Specifies the default return value of the group. Defaults to
    'false'.

1b. The 'except' tag
  Defines an exception to the default return value of the group it is
  defined in. The attributes are the same what in the 'group' tag
  above. When a match is made on the 'except' clause, the return value
  is reverse to the group default.
  Exceptions are rendered _before_ the subgroups.

2. Overall syntax
  The 'group' container tags can be nested to any depth and can
  also contain the 'except' tags.
  The 'except' tags can be specified only within a group.
  Unknown tags are silently ignored.

-->
<uplevel>
  <group positions="0-3" match="Mozi">
    <!-- Mozilla and compatibles -->
    <group positions="7-10" match="/4.0" javascript="true">
      <!-- MSIE, Netscape 4.0, Opera -->
      <except positions="13-28" match="ActiveTouristBot"/>
    </group>
    <!-- IE9 or newer -->
    <group positions="7-10" match="/5.0" javascript="true">
      <!-- MSIE 10, MSIE 11 -->
	    <except positions="13-28" match="ActiveTouristBot"/>
    </group>
    <group scanfrom="12" skip="4" match=") Gecko/" javascript="true">
      <!-- All the Gecko-based browsers -->
    </group>

    <group scanfrom="12" skip="4" match=") Opera" javascript="true">
      <!-- Opera -->
    </group>

    <group positions="12-15" match="(Mac" javascript="true">
      <!-- Safari -->
    </group>

    <group scanfrom="12" skip="2" match="(KHTML" javascript="true">
      <!-- Safari -->
    </group>

    <group positions="12-15" match="Gale" javascript="true">
      <!-- Galeon < 2.0 -->
    </group>
    
    <group positions="25-28" match="Konq" javascript="true">
      <!-- Konqueror -->
    </group>

    <group positions="9-11,12" match="/4.,[" javascript="true">
      <!-- Netscape 4.x -->
    </group>
  </group>

  <group positions="0-3" match="Konq" javascript="true">
    <!-- Konqueror -->
  </group>

  <group positions="0-3" match="Oper" javascript="true">
    <!-- Opera -->
  </group>
</uplevel>