1 <?xml version=
"1.0" encoding=
"utf-8"?>
3 <xsd:schema id=
"root" xmlns=
"" xmlns:
xsd=
"http://www.w3.org/2001/XMLSchema" xmlns:
msdata=
"urn:schemas-microsoft-com:xml-msdata">
4 <xsd:import namespace=
"http://www.w3.org/XML/1998/namespace" />
5 <xsd:element name=
"root" msdata:
IsDataSet=
"true">
7 <xsd:choice maxOccurs=
"unbounded">
8 <xsd:element name=
"metadata">
11 <xsd:element name=
"value" type=
"xsd:string" minOccurs=
"0" />
13 <xsd:attribute name=
"name" use=
"required" type=
"xsd:string" />
14 <xsd:attribute name=
"type" type=
"xsd:string" />
15 <xsd:attribute name=
"mimetype" type=
"xsd:string" />
16 <xsd:attribute ref=
"xml:space" />
19 <xsd:element name=
"assembly">
21 <xsd:attribute name=
"alias" type=
"xsd:string" />
22 <xsd:attribute name=
"name" type=
"xsd:string" />
25 <xsd:element name=
"data">
28 <xsd:element name=
"value" type=
"xsd:string" minOccurs=
"0" msdata:
Ordinal=
"1" />
29 <xsd:element name=
"comment" type=
"xsd:string" minOccurs=
"0" msdata:
Ordinal=
"2" />
31 <xsd:attribute name=
"name" type=
"xsd:string" use=
"required" msdata:
Ordinal=
"1" />
32 <xsd:attribute name=
"type" type=
"xsd:string" msdata:
Ordinal=
"3" />
33 <xsd:attribute name=
"mimetype" type=
"xsd:string" msdata:
Ordinal=
"4" />
34 <xsd:attribute ref=
"xml:space" />
37 <xsd:element name=
"resheader">
40 <xsd:element name=
"value" type=
"xsd:string" minOccurs=
"0" msdata:
Ordinal=
"1" />
42 <xsd:attribute name=
"name" type=
"xsd:string" use=
"required" />
49 <resheader name=
"resmimetype">
50 <value>text/microsoft-resx
</value>
52 <resheader name=
"version">
55 <resheader name=
"reader">
56 <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=
2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
</value>
58 <resheader name=
"writer">
59 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=
2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
</value>
61 <data name=
"jsfunctions" xml:
space=
"preserve">
64 Behaviour v1.1 by Ben Nolan, June
2005. Based largely on the work
65 of Simon Willison (see comments by Simon below).
69 Uses css selectors to apply javascript behaviours to enable
70 unobtrusive javascript in html documents.
75 'b.someclass' : function(element){
76 element.onclick = function(){
77 alert(this.innerHTML);
80 '#someid u' : function(element){
81 element.onmouseover = function(){
82 this.innerHTML =
"BLAH!";
87 Behaviour.register(myrules);
89 // Call Behaviour.apply() to re-apply the rules (if you
90 // update the dom, etc).
94 This file is entirely BSD licensed.
98 http://ripcord.co.nz/behaviour/
105 register : function(sheet){
106 Behaviour.list.push(sheet);
110 Behaviour.addLoadEvent(function(){
116 for (h=
0;sheet=Behaviour.list[h];h++){
117 for (selector in sheet){
118 list = document.getElementsBySelector(selector);
124 for (i=
0;element=list[i];i++){
125 sheet[selector](element);
131 addLoadEvent : function(func){
132 var oldonload = window.onload;
134 if (typeof window.onload != 'function') {
135 window.onload = func;
137 window.onload = function() {
148 The following code is Copyright (C) Simon Willison
2004.
150 document.getElementsBySelector(selector)
151 - returns an array of element objects from the current document
152 matching the CSS selector. Selectors can contain element names,
153 class names and ids and can be nested. For example:
155 elements = document.getElementsBySelect('div#main p a.external')
157 Will return an array of all 'a' elements with 'external' in their
158 class attribute that are contained inside 'p' elements that are
159 contained inside the 'div' element which has
id=
"main"
161 New in version
0.4: Support for CSS2 and CSS3 attribute selectors:
162 See http://www.w3.org/TR/css3-selectors/#attribute-selectors
164 Version
0.4 - Simon Willison, March
25th
2003
165 -- Works in Phoenix
0.5, Mozilla
1.3, Opera
7, Internet Explorer
6, Internet Explorer
5 on Windows
169 function getAllChildren(e) {
170 // Returns all children of element. Workaround required for IE5/Windows. Ugh.
171 return e.all ? e.all : e.getElementsByTagName('*');
174 document.getElementsBySelector = function(selector) {
175 // Attempt to fail gracefully in lesser browsers
176 if (!document.getElementsByTagName) {
179 // Split selector in to tokens
180 var tokens = selector.split(' ');
181 var currentContext = new Array(document);
182 for (var i =
0; i < tokens.length; i++) {
183 token = tokens[i].replace(/^\s+/,'').replace(/\s+$/,'');;
184 if (token.indexOf('#')
> -
1) {
185 // Token is an ID selector
186 var bits = token.split('#');
187 var tagName = bits[
0];
189 var element = document.getElementById(id);
190 if (tagName && element.nodeName.toLowerCase() != tagName) {
191 // tag with that ID not found, return false
194 // Set currentContext to contain just this element
195 currentContext = new Array(element);
196 continue; // Skip to next token
198 if (token.indexOf('.')
> -
1) {
199 // Token contains a class selector
200 var bits = token.split('.');
201 var tagName = bits[
0];
202 var className = bits[
1];
206 // Get elements matching tag, filter them for class selector
207 var found = new Array;
209 for (var h =
0; h < currentContext.length; h++) {
211 if (tagName == '*') {
212 elements = getAllChildren(currentContext[h]);
214 elements = currentContext[h].getElementsByTagName(tagName);
216 for (var j =
0; j < elements.length; j++) {
217 found[foundCount++] = elements[j];
220 currentContext = new Array;
221 var currentContextIndex =
0;
222 for (var k =
0; k < found.length; k++) {
223 if (found[k].className && found[k].className.match(new RegExp('\\b'+className+'\\b'))) {
224 currentContext[currentContextIndex++] = found[k];
227 continue; // Skip to next token
229 // Code to deal with attribute selectors
230 if (token.match(/^(\w*)\[(\w+)([=~\|\^\$\*]?)=?
"?([^\]"]*)
"?\]$/)) {
231 var tagName = RegExp.$1;
232 var attrName = RegExp.$2;
233 var attrOperator = RegExp.$3;
234 var attrValue = RegExp.$4;
238 // Grab all of the tagName elements within current context
239 var found = new Array;
241 for (var h = 0; h < currentContext.length; h++) {
243 if (tagName == '*') {
244 elements = getAllChildren(currentContext[h]);
246 elements = currentContext[h].getElementsByTagName(tagName);
248 for (var j = 0; j < elements.length; j++) {
249 found[foundCount++] = elements[j];
252 currentContext = new Array;
253 var currentContextIndex = 0;
254 var checkFunction; // This function will be used to filter the elements
255 switch (attrOperator) {
256 case '=': // Equality
257 checkFunction = function(e) { return (e.getAttribute(attrName) == attrValue); };
259 case '~': // Match one of space seperated words
260 checkFunction = function(e) { return (e.getAttribute(attrName).match(new RegExp('\\b'+attrValue+'\\b'))); };
262 case '|': // Match start with value followed by optional hyphen
263 checkFunction = function(e) { return (e.getAttribute(attrName).match(new RegExp('^'+attrValue+'-?'))); };
265 case '^': // Match starts with value
266 checkFunction = function(e) { return (e.getAttribute(attrName).indexOf(attrValue) == 0); };
268 case '$': // Match ends with value - fails with "Warning
" in Opera 7
269 checkFunction = function(e) { return (e.getAttribute(attrName).lastIndexOf(attrValue) == e.getAttribute(attrName).length - attrValue.length); };
271 case '*': // Match ends with value
272 checkFunction = function(e) { return (e.getAttribute(attrName).indexOf(attrValue) > -1); };
275 // Just test for existence of attribute
276 checkFunction = function(e) { return e.getAttribute(attrName); };
278 currentContext = new Array;
279 var currentContextIndex = 0;
280 for (var k = 0; k < found.length; k++) {
281 if (checkFunction(found[k])) {
282 currentContext[currentContextIndex++] = found[k];
285 // alert('Attribute Selector: '+tagName+' '+attrName+' '+attrOperator+' '+attrValue);
286 continue; // Skip to next token
289 if (!currentContext[0]){
293 // If we get here, token is JUST an element (not a class or ID selector)
295 var found = new Array;
297 for (var h = 0; h < currentContext.length; h++) {
298 var elements = currentContext[h].getElementsByTagName(tagName);
299 for (var j = 0; j < elements.length; j++) {
300 found[foundCount++] = elements[j];
303 currentContext = found;
305 return currentContext;
308 /* That revolting regular expression explained
309 /^(\w+)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]
"]*)"?\]$/
310 \---/ \---/\-------------/ \-------/