Пример #1
0
        public void test_expr2()
        {
            var syntax = new Syntax2();

            syntax.Load(Xpathfile);
            var sx = new XPathParser(syntax);
            var x  = new List <Expression>();

            x.Add(sx.GetExpression("if ($a ne 0) then (iaf:numeric-equal($b, iaf:sum(($c, $d, $e, iaf:numeric-unary-minus($a))))) else true()"));
            x.Add(sx.GetExpression("string-length(string(xfi:fact-typed-dimension-value($a,QName(\"http://www.boi.org.il/xbrl/dict/dim\",\"TDR\")))) <= 20"));
            x.Add(sx.GetExpression("iaf:numeric-greater-equal-than((for $i in $a return iaf:abs($i)), (for $i in $b return iaf:abs($i)))"));
            x.Add(sx.GetExpression("matches($a, \"[\\d\\w]+(([_|\\.|\\-])?[\\d\\w]+)*@[\\d\\w]+(([_|\\.|\\-])?[\\d\\w]+)*\")"));
            x.Add(sx.GetExpression("concat(month-from-date($a), \"-\", day-from-date($a)) = (\"3-31\" cast as xs:string) or concat(month-from-date($a), \"-\", day-from-date($a)) = (\"6-30\" cast as xs:string) or concat(month-from-date($a), \"-\", day-from-date($a)) = (\"9-30\" cast as xs:string) or concat(month-from-date($a), \"-\", day-from-date($a)) = (\"12-31\" cast as xs:string)"));
            x.Add(sx.GetExpression("if (string-length(string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\")))) = 9)  then ((substring(string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))),1,1) != \"8\")  and (substring(string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))),1,3) != \"999\")  and (string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) != \"111111111\")) else (true())"));
            x.Add(sx.GetExpression("$a = $b + $c"));
            x.Add(sx.GetExpression("not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700009848 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 520041690 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700003825 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 520031931 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700010085 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 513890368 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700013329 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 520036658 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 644035024 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 520000472 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700000862 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 520013954 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700003817 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 520014143 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700003957 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 510216054 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700003809 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 511076572 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700011612 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 520022732 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700011620 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 570000745 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700016082 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 520044322 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700016090 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 520028283 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700016108 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 520005067 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700016116 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 520004078 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700016124 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 520027830 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700016132 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 520017070 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700016140 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 520024647 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700016181 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 33260971 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700016157 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 520033093 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700016165 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 513767079 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700016173 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 520003781 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700016470 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 510313778 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700016934 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 520037565 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700017080 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 520032285 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700017122 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 511984213 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700017130 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 511780793 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700017833 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 511325870 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700017957 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 520033234 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700018096 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 513326439 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700007891 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 512480971 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700018955 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 511888356 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700019151 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 550212021 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700019714 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 550225510 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700020183 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 520004896 cast as xs:string)) and  not((string(xfi:fact-typed-dimension-value($a, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 700020357 cast as xs:string) and (string(xfi:fact-typed-dimension-value($b, QName(\"http://www.boi.org.il/xbrl/dict/dim\", \"TDD\"))) = 510947153 cast as xs:string))"));
            x.Add(sx.GetExpression("(month-from-dateTime(xfi:period-instant(xfi:period($a))) = 4 and day-from-dateTime(xfi:period-instant(xfi:period($a))) = 1) or (month-from-dateTime(xfi:period-instant(xfi:period($a))) = 7 and day-from-dateTime(xfi:period-instant(xfi:period($a))) = 1) or (month-from-dateTime(xfi:period-instant(xfi:period($a))) = 10 and day-from-dateTime(xfi:period-instant(xfi:period($a))) = 1) or (month-from-dateTime(xfi:period-instant(xfi:period($a))) = 1 and day-from-dateTime(xfi:period-instant(xfi:period($a))) = 1)"));
            x.Add(sx.GetExpression("((floor($a div 100) = 1 or floor($a div 100) = 4 or floor($a div 100) = 7 or floor($a div 100) = 9)) and  ((floor(($a - floor($a div 100) * 100) div 10) = 0) or (floor(($a - floor($a div 100) * 100) div 10) = 1) or (floor(($a - floor($a div 100) * 100) div 10) = 2))"));
        }
Пример #2
0
 public CodeParser(Syntax2 Syntax)
 {
     this.Syntax = Syntax;
 }