From 1c5685d68f1b73270fb814fe04cbb490eb90ba5f Mon Sep 17 00:00:00 2001 From: mensonge Date: Fri, 14 Nov 2008 15:39:19 +0000 Subject: Minor fix: Remove DOJO library (60Mo) replaced by link to Google CDN (online DOJO library) git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@159 b3834d28-1941-0410-a4f8-b48e95affb8f --- includes/js/dojox/jsonPath/query.js | 163 ------------------------------------ 1 file changed, 163 deletions(-) delete mode 100644 includes/js/dojox/jsonPath/query.js (limited to 'includes/js/dojox/jsonPath/query.js') diff --git a/includes/js/dojox/jsonPath/query.js b/includes/js/dojox/jsonPath/query.js deleted file mode 100644 index 4e24309..0000000 --- a/includes/js/dojox/jsonPath/query.js +++ /dev/null @@ -1,163 +0,0 @@ -if(!dojo._hasResource["dojox.jsonPath.query"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code. -dojo._hasResource["dojox.jsonPath.query"] = true; -dojo.provide("dojox.jsonPath.query"); - -dojox.jsonPath.query = function(/*Object*/obj, /*String*/expr, /*Object*/arg){ - // summaRy - // Perform jsonPath query `expr` on javascript object or json string `obj` - // obj - object || json string to perform query on - // expr - jsonPath expression (string) to be evaluated - // arg - {}special arugments. - // resultType: "VALUE"||"BOTH"||"PATH"} (defaults to value) - // evalType: "RESULT"||"ITEM"} (defaults to ?) - - var re = dojox.jsonPath._regularExpressions; - if (!arg){arg={};} - - var strs = []; - function _str(i){ return strs[i];} - var acc; - if (arg.resultType == "PATH" && arg.evalType == "RESULT") throw Error("RESULT based evaluation not supported with PATH based results"); - var P = { - resultType: arg.resultType || "VALUE", - normalize: function(expr){ - var subx = []; - expr = expr.replace(/'([^']|'')*'/g, function(t){return "_str("+(strs.push(eval(t))-1)+")";}); - var ll = -1; - while(ll!=subx.length){ - ll=subx.length;//TODO: Do expression syntax checking - expr = expr.replace(/(\??\([^\(\)]*\))/g, function($0){return "#"+(subx.push($0)-1);}); - } - expr = expr.replace(/[\['](#[0-9]+)[\]']/g,'[$1]') - .replace(/'?\.'?|\['?/g, ";") - .replace(/;;;|;;/g, ";..;") - .replace(/;$|'?\]|'$/g, ""); - ll = -1; - while(ll!=expr){ - ll=expr; - expr = expr.replace(/#([0-9]+)/g, function($0,$1){return subx[$1];}); - } - return expr.split(";"); - }, - asPaths: function(paths){ - for (var j=0;j