Annotation of parser3/www/htdocs/index.html, revision 1.164

1.104     paf         1: @USE
1.105     paf         2: /derived.p
1.145     paf         3: /operators.p
1.15      paf         4: 
1.72      paf         5: @auto[filespec]
                      6: $selffilespec[$filespec]
1.63      paf         7: #$form:here
1.131     paf         8: #$request:charset[UTF-8]
                      9: $request:charset[windows-1251]
                     10: $response:charset[windows-1251]
1.112     paf        11: #$response:charset[UTF-8]
1.131     paf        12: #$response:charset[empty]
1.84      paf        13: #$response:content-type[$.value[text/html]$.charset[$response:charset]]
1.15      paf        14: 
1.60      paf        15: #@postprocess[body]
                     16: #<b>$body</b>
                     17: #$result[123]
1.37      paf        18: 
1.15      paf        19: @main[]
1.72      paf        20: #$a(123)
                     21: #^a.format[%.10u]
1.71      paf        22: #$result[111]
1.70      paf        23: #^f[a]
1.133     paf        24: #^connect[mysql://mdm:4b833ljq@db-mysql/mdm]{
1.88      paf        25: #      ^int:sql{select news_id from news where news_id=-1}[
1.143     paf        26: #      $.default{2}
1.88      paf        27: #      ]<br>
1.115     paf        28: #    ^hash::sql{bad}
1.88      paf        29: #    ^string:sql{select news_id from news where news_id=-1}[$.default{2}]
1.109     paf        30: #      ^file::load[text;^string:sql{select 'from sql server' }]
1.95      paf        31: #      ^string:sql{select '^^hello[]' }] $ORIGINS(1)
1.96      paf        32: #      ^process{       ^^h[]}
1.97      paf        33: #      ^process{^string:sql{select '1
                     34: #      ^^hello[]' }]   }
1.131     paf        35: #      ^double:sql{select '2*' ^; }
1.133     paf        36: #$card_sequence_expect_no(^double:sql{select 20020909131047 #card_sequence_expect_no from card_sequence})
                     37: #^card_sequence_expect_no.format[%15.f]
                     38: #}
1.49      paf        39: #^eval(2)
1.48      paf        40: #^tcrashlocaljunctionsv2[]
1.49      paf        41: #^tcrashlocaljunctions[]
1.50      paf        42: #^tjunctions[]
1.47      paf        43: #^replacetest[]
1.48      paf        44: #^matchoptionpp[]
1.46      paf        45: #^txdocxnodechild[]
1.44      paf        46: #^tclasses[]
1.43      paf        47: #$math:PI
                     48: #^b:method[]
1.42      paf        49: #^main[]
1.41      paf        50: #^errort[]
1.44      paf        51: #^tselectNumber[]
1.39      paf        52: #$result[hello]
1.36      paf        53: #^invaliddate2[]
                     54: #^process2[]
                     55: #^casehashtext[]
1.35      paf        56: #^subjvaltest[]
                     57: #^tableselect0[]
1.34      paf        58: #^memnotest1[]
1.32      paf        59: #^voidparams[]
1.31      paf        60: #^rolls2[]
1.30      paf        61: #^cacheexpireschanging[]
1.29      paf        62: #^cacheexpiresfixed[]
                     63: #^dateoffsets[]
                     64: #^exceptionTypes[]
1.28      paf        65: #^roll2[]
1.27      paf        66: #^rolls[]
1.25      paf        67: #^exceptions1[]
1.22      paf        68: #^locate_by_expr[]
1.18      paf        69: #^method_junction_params{...}
1.17      paf        70: #^verifyCookie[paf]
1.37      paf        71: #^execlangs[]
1.16      paf        72: #$t[^tobjeresult[]]$t.a
                     73: #^xmlprobs[]
1.15      paf        74: #^doubleprobs[]
                     75: #^math:random(-10)
                     76: #^divnamestop[]
                     77: #^arrayclone[]
                     78: #^operator_tricks[]
                     79: #^xoutputrusattr[]
                     80: #^xdocset1[]
                     81: #^regexp3[]
                     82: #^exec2[]
                     83: #^tlock[]
                     84: #^xmloutattrwithoutvalue[]
                     85: #^precisionProblem[]
                     86: #^xpath[]
                     87: #^ttablesetlang[]
                     88: #^ttime[]
                     89: #^tupper[]
                     90: #^treplace[]
                     91: #^xslt2[]
                     92: #^tcache2[]
                     93: #$ORIGINS(1)
                     94: #$t[^table::set{a b} ^table::set{c d}]
                     95: #^ttaintuntaint[]
                     96: #^tappend2[]
                     97: #^badvsnprintf[]
                     98: #^badoracequoting[]
                     99: #^badconstructors[]
                    100: #^xloadwrongtable[]
                    101: #^xsetwrongtable[]
                    102: #^if($form:test){y}{n}
                    103: #^tablecolumnerror[]
                    104: #^roll[]
                    105: #^tableset[]
                    106: #^math:PI.format{%.30f}
                    107: #^xchildren[]
                    108: #^thashforeach3[]
                    109: #^thashforeach2[]
                    110: #^thashforeach[]
                    111: #^thashdelete[]
                    112: #^connect[mysql://user:pass@cd.rinet.ru/db]{^void:sql{z} }
                    113: #^tappend[]
                    114: #^sappend[]
                    115: #^eval(10\3)<br>
                    116: #^tform[]
                    117: #^formattest[]
                    118: #^filelist[]
                    119: #^connect[mysql://user:pass@host]{ }
                    120: #^безнадёжна_попытка_поправить_непоправимое[]
                    121: #^tcache[]
                    122: #^thashfileexp[]
                    123: #^tcounter[]
                    124: #^tablehash[]
                    125: #j^hashfile[]
                    126: #^formclass[]
                    127: #^hren[]
                    128: #^domedit[]
                    129: #^domxslt[]
                    130: #^lsplit2[]
                    131: #^faceesize[]
                    132: #^imageresize[]
                    133: #^ifassignhash[]
                    134: #^tintdefault[]
                    135: #$response:status[404]
                    136: #^ifpasshash[]
                    137: #^movedir[]
                    138: #^replace[]
                    139: #^set[]
                    140: #^hash[]<hr>
                    141: #$t[^methresult[]] ->$t
                    142: #^terror[]
                    143: #^ssave[]
                    144: #^thash[]
                    145: #^tdef[]
                    146: #^ford[]
                    147: #^tif[]
1.84      paf       148: #^image[]
1.15      paf       149: #^response[]
                    150: #^regexp2[]
                    151: #^ttablerem[]
                    152: #^pcre[]
                    153: #^regexp[]<hr>
                    154: #^mail[]
                    155: #^fori[]
                    156: #^tconnect[]
                    157: #^xslt[]
                    158: #^header[]
1.53      paf       159: #^tablehasht[]
1.54      paf       160: #^datecreatestring[]
1.56      paf       161: #^mssqltypes1[]
                    162: #^badthrows[]
1.57      paf       163: #^xmlspace[]
                    164: #^counter[main.counter]
                    165: #^xpath2[]
                    166: #^callindirect[]
                    167: #^junctionprob[]
1.59      paf       168: #^datecreatestring2[]
                    169: #^tstoredproc[]
                    170: #^tstoredproc2[]
                    171: #^forkeys[]
1.60      paf       172: #^pngsize[]
1.61      paf       173: #^checkList[]
1.63      paf       174: #^datetest[]
1.65      paf       175: #^tserge[]
1.69      paf       176: #^envt[]
1.67      paf       177: #^selectt[]
                    178: #^select2[]
                    179: #^selectSingle2[]
                    180: #^selectString2[]
                    181: #^selectNumber2[]
                    182: #^selectBool2[]
                    183: #^xdoccreate[]
                    184: #^xdoccreatetag[]
1.70      paf       185: #^xdocload[]
1.67      paf       186: #^xdocstring[]
                    187: #^xdocsave[]
1.68      paf       188: #^div[]
                    189: #^datecreatestring3[]
1.73      paf       190: #^tfilespec[]
1.77      paf       191: #^tcrypt[]
1.74      paf       192: #^cryptdocsample[]
1.78      paf       193: #^tnormalize[]
1.83      paf       194: #^xmltransformbyxdoc[]
1.81      paf       195: #^sergestrandef[]
1.83      paf       196: #^tstdin[]
                    197: #^tfind[]
1.86      paf       198: #^mimet[]
1.92      paf       199: #^joinlimit[]
1.89      paf       200: #^tableclonelimit[]
1.91      paf       201: #^transparams[]
                    202: #^sendtests[]
1.93      paf       203: #^wwrapperpass[]
1.95      paf       204: #^badpos[]
1.98      paf       205: #^processtest[]
                    206: #^mail3[]
1.100     paf       207: #^datesaving[]
1.101     paf       208: #^badconstructor[]
1.103     paf       209: #^calendar[]
1.104     paf       210: #^monthdays(8)
                    211: #^xdoctypetest[]
1.105     paf       212: #^xtabletest[]
1.117     paf       213: #^staticstest[]
1.108     paf       214: #^staticstest2[]
1.115     paf       215: #^rbodytest[]
                    216: #^cookie[]
1.116     paf       217: #^cookieexpirestest[]
1.119     paf       218: #^postest[]
1.120     paf       219: #^voidpostest[]
1.122     paf       220: #^badcolumntest[]
1.124     paf       221: #^delimiters[]
1.125     paf       222: #^новый-split[]
1.127     paf       223: #^грязные-cookie[]
                    224: #^html-почта[]
                    225: #^badswitchtest[]
1.128     paf       226: #^okswitchtest[]
1.131     paf       227: #^cgit[]
1.132     paf       228: #^ttransformsep[]
1.133     paf       229: #^calltest[]
1.134     paf       230: #^xpath3[]
1.139     paf       231: #^doubleliterals[]
                    232: #^newxor[]
1.135     paf       233: #^mail2[]
1.139     paf       234: #^exec[]
1.140     paf       235: #^passpost[]
1.141     paf       236: #^fordelim[]
1.143     paf       237: #^duplicatetable2hashkey[]
1.142     paf       238: #^duplicatehashsqlkey[]
1.145     paf       239: #^longlreplace[]
                    240: #^table2hash_onecolumn[]
1.146     paf       241: #^crossopvars[]
1.148     paf       242: #^three[]
1.149     paf       243: #^badLangAfterCatch[]
1.150     paf       244: #^zeroinstdin[]
1.151     paf       245: #^shifts[]
                    246: #^jspace[]
1.152     paf       247: #^hashselfmodification[]
                    248: #^emptyTransformResult[]
                    249: #^badxdoccreate[]
1.154     paf       250: #^if(-d "CVS"){y}{n}
1.155     paf       251: #^badjunctioncall[]
1.156     paf       252: #^russianindex[]
                    253: #^virtualtest[]
                    254: #^xml[]
                    255: #^mail4[]
1.157     paf       256: #^voidconstructorpass[]
1.160     paf       257: #^$form:CLASS.a=$form:CLASS.a<br>
                    258: #^cookie2[]
                    259: #^menudelim[]
1.158     paf       260: #^touchittest[]
1.162     paf       261: #^touchittest2[]
1.160     paf       262: #^opauto[]
1.161     paf       263: #^trycontextt[]
                    264: #^tfor[]
1.162     paf       265: #^user-foreach-test[]
                    266: #^includet[]
1.163     paf       267: #^derived:includet[]
1.164   ! paf       268: #^fortestsep[]
        !           269: ^derived:inclass_process_test[]
1.163     paf       270: 
                    271: @fortestsep[][i]
                    272: ^for[i](1;3){$i}[,]
1.162     paf       273: 
                    274: @includet[]
                    275: ^include[some.p]
                    276: ^included_method[2]
                    277: 
                    278: @user-foreach-test[][key;value]
                    279: ^user-foreach[key;value]{$key=$value<br>}
                    280: 
                    281: @user-foreach[key;value;code]
                    282: ^for[i](1;10){
                    283:        $caller.$key($i)
                    284:        $caller.$value($i*2)
                    285:        $code
                    286: }
                    287: 
1.161     paf       288: 
                    289: @tfor[][i]
                    290: ^for[i](1;10){
                    291: $i
                    292: }
1.160     paf       293: 
                    294: @trycontextt[]
                    295: ^try{
                    296:        ^trycontexttsub[]
                    297: }{
                    298:        $exception.handled(0)
                    299: }
                    300: 
                    301: 
                    302: @trycontexttsub[]
                    303: ^bad[]
                    304: 
                    305: 
                    306: @opauto[]
                    307: ^reada[]
1.159     paf       308: 
                    309: 
1.157     paf       310: @rusage2[]
1.77      paf       311: <hr>
1.74      paf       312: OK
1.157     paf       313: 
                    314: @rusage2[]
                    315: $s[$status:rusage]
                    316: 
                    317: ^s.tv_sec.format[%.0f].^s.tv_usec.format[%06.0f]
                    318: 
1.150     paf       319: 
1.156     paf       320: @voidconstructorpass[]
                    321: $a[$form:a]
                    322: =^form:a.int(1)=
                    323: =^a.int(1)=
                    324: 
                    325: 
1.155     paf       326: @russianindex[]
                    327: #dir with files with russian-lang names
                    328: $where[dir]
                    329: 
                    330: $dir[^file:list[$where;\.txt^$]]
                    331: ^dir.menu{
                    332:        <a href=$where/^untaint[uri]{$dir.name}>$dir.name</a><br>
                    333: }
                    334: 
1.154     paf       335: @badjunctioncall[]
                    336: ^badjunctioncallinside{code}
                    337: 
                    338: @badjunctioncallinside[code]
1.155     paf       339: xx^code[]
1.152     paf       340: 
                    341: @badxdoccreate[]
                    342: $xdoc[^xdoc::create[вася]]
                    343: #$xdoc[^xdoc::create{<?xml version="1.0" encoding="$request:charset"?><doc>вася</doc>}]
                    344: 
                    345: ^xdoc.firstChild.setAttribute[name;значение]
                    346: ^xdoc.string[]
                    347: 
                    348: 
                    349: @emptyTransformResult[]
                    350: $input[^xdoc::create[docBad]]
                    351: $sheet[^xdoc::create{<?xml version="1.0"?> 
                    352: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
                    353:        <xsl:template match="doc">
                    354:                output
                    355:        </xsl:template>
                    356: </xsl:stylesheet>
                    357: }]
                    358: $output[^input.transform[$sheet]]
                    359: $response:body[^output.file[]]
                    360: 
                    361: @hashselfmodification[]
                    362: $hash[
                    363:        $.a[1]
                    364:        $.b[2]
                    365: ]
                    366: ^hash.foreach[key;value]{
                    367: #      $hash.c[1]
                    368:        $hash.a[1]
                    369: }      
                    370: 
                    371: @touchittest[][i]
1.160     paf       372: $i[before]
                    373: ^touchit[]
                    374: $i
                    375: 
                    376: @touchittest2[]
1.158     paf       377: $i[before]
1.152     paf       378: ^touchit[]
                    379: $i
                    380: 
1.151     paf       381: 
                    382: @jspace[]
                    383: $a(1)
                    384: ^jspace_call{^eval($a*2)}
                    385: #$a(2)
                    386: #$junction
                    387: 
                    388: @jspace_call[param][a]
                    389: $a[unrelcfgdfgated]
                    390: $junction<br>
                    391: $junction.a(2)
                    392: $junction<br>
                    393: 
1.150     paf       394: @shifts[]
                    395: ^eval(1<<3)<br>
                    396: ^eval(8>>2)<br>
1.151     paf       397: #^if(1=1){y;n}<br>
1.150     paf       398: 
1.149     paf       399: 
                    400: @zeroinstdin[]
                    401: #$f[^file::exec[a.pl;$.stdin[$.shit[]]]]
                    402: $f[^file::exec[a.pl;$.stdin[^file::load[binary;1z2.txt]]]]
                    403: =$f.text=
                    404: ^f.save[binary;1z2.out]
1.148     paf       405: 
                    406: @badLangAfterCatch[]
                    407: ^try{
                    408:        $a[ 
                    409:                тут язык сменился на pass_appended
                    410:                ^throw[user;test]
                    411:                и улетело с не тем  языком
                    412:        ]
                    413: }{
                    414:        $exception.handled(1)
                    415: }
                    416: 1  2
1.145     paf       417: 
                    418: @crossopvars[]
                    419: #^one[]<hr>
                    420: ^two[]<hr>
                    421: 
                    422: @table2hash_onecolumn[]
                    423: $t[^table::create{a
                    424: 1
                    425: 1
                    426: }]
                    427: #^t.hash[a]
                    428: #^t.hash[a;b]
                    429: $h[^t.hash[a][$.distinct(1)]]
                    430: $h.1.a
1.143     paf       431: 
                    432: @longlreplace[]
1.144     paf       433: $str1[  мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла мыла ]
1.143     paf       434: $str2[ела]
                    435: $str[Мама $str1 раму]
                    436: 
1.144     paf       437: ^str.replace[^table::create[nameless]{мыла     $str2}]
1.141     paf       438: 
                    439: @duplicatehashsqlkey[]
                    440: ^connect[mysql://mdm:4b833ljq@db-mysql/mdm]{
                    441:        $t[^table::sql{select * from news}]
                    442:        $c[^t.columns[]]
                    443:        ^c.menu{$c.column}[,]
                    444: 
1.142     paf       445:        $h[^hash::sql{select news_type_id, name from news}[$.distinct(1)]]
1.141     paf       446: }
                    447: 
                    448: @duplicatetable2hashkey[]
                    449: $t[^table::create{a    b
                    450: 1      2
                    451: 1      3
                    452: }]
1.142     paf       453: #^t.hash[a]
                    454: #^t.hash[a;b]
                    455: ^t.hash[a][$.distinct[1]]
1.140     paf       456: 
                    457: @menudelim[]
                    458: $t[^table::create{a
                    459: 1
                    460: 2
                    461: 3
                    462: 4
                    463: 5
                    464: }]
                    465: 
                    466: ^t.menu{^if($t.a<3){}{$t.a}}[,]
                    467: 
                    468: @fordelim[]
                    469: ^for[a](0;6){^if($a<3){}{$a}}[,]
                    470: 
1.135     paf       471: 
1.139     paf       472: @passpost[]
                    473: <form method=post name="test" id="test">
                    474: <textarea name="text" cols=20 rows =6>^taint[html][1
                    475: 2
                    476: 
                    477: 3]</textarea><br>
                    478: <input type=submit>
                    479: </form>
                    480: 
                    481: ^if(def $form:text){
                    482:        $a[^file::cgi[a.pl]]
                    483:        $a.text|$a.status|$a.stderr<hr>
                    484: }
                    485: 
                    486: @exec[]
                    487: #$a[^file::exec[a.cmd]]
                    488: $a[^file::cgi[a.cmd]]
                    489: $a.text|$a.status|$a.stderr<hr>
                    490: 
                    491: 
1.137     paf       492: @newxor[]
1.138     paf       493: ^eval(1!|2 #примечание()zzz
                    494: |0x100)<br>
1.137     paf       495: #^eval(1!||2)<br>
                    496: ^if(1!|1){y}{n}
                    497: 
                    498: #@method[$bad]
1.136     paf       499: 
1.135     paf       500: @doubleliterals[]
                    501: #^eval(1e-10)
                    502: ^eval("1e-20")
1.133     paf       503: 
                    504: @xpath3[]
                    505: $constr[^xdoc::create{<?xml version="1.0" encoding="$request:charset" standalone="no"?> <constructor-data><object object_type_id="1" template_id="1" data_process_id="1" is_published="1">проверка</object> <block-list> <block name="date" type="0" label="Дата" is_hide_pub="1" data_type="1"/> <block name="content" type="0" label="Текст" is_hide_pub="1" data_type=""/> </block-list></constructor-data>}]
                    506: $objectData[^constr.selectSingle[/constructor-data/object]]
                    507: $objectData.nodeType<br>
                    508: $objectData.firstChild.nodeValue
                    509: 
                    510: @calltest[]
                    511: ^calltest2[string]
                    512: 
                    513: @calltest2[s]
                    514: $s
1.131     paf       515: 
                    516: @ttransformsep[]
                    517: $input[^xdoc::load[20020909131046.xml]]
                    518: $output[^input.transform[generated.xsl]]
                    519: ^output.string[]
1.127     paf       520: 
                    521: @okswitchtest[]
                    522: $local[local value]
                    523: ^switch[1]{
                    524:        ^case[1]{1code $local}
                    525: }
                    526: 
                    527: @badswitchtest[]
                    528: ^switch[1]{
                    529:        ^badswitchtestcase[]
                    530: }
                    531: @badswitchtestcase[][local]
                    532: $local[local value]
                    533:        ^case[1]{1code $local}
                    534: 
                    535: @badjunction[]
                    536: ^badj1[]
                    537: ^badj2[]
                    538: 
                    539: @html-почта[]
                    540: $переменная[значение]
                    541: ^mail:send[
                    542:        $.from[paf@mail]
                    543:        $.to[paf@mail]
                    544:        $.subject[htmltest1]
                    545:        $.html{тест$переменная=  !}
                    546: ]
                    547: 
1.124     paf       548:                  
                    549: @грязные-cookie[]
1.126     paf       550: $cookie:a[&]
1.125     paf       551: $cookie:a
1.124     paf       552: 
                    553: @новый-split[]
                    554: $abc[a.b.c]
                    555: #$table[^abc.split[.]]
                    556: #$table[^abc.split[.;l]]
                    557: #$table[^abc.split[.;v]]
                    558: $table[^abc.split[.;lv]]
                    559: ^table.menu{$table.piece}[,]
                    560: <hr>
                    561: #$table[^abc.split[.;h]]
                    562: $table[^abc.split[.;hr]]
                    563: $table.0,$table.1,$table.2<br>
1.123     paf       564: 
                    565: @delimiters[]
                    566: $a#1[1]<br>
                    567: $a#1=<br>
                    568: 
1.121     paf       569: 
                    570: @badcolumntest[]
                    571: $table[^table::load[ext.cfg]]
                    572: $table.b
                    573: 
1.120     paf       574: 
                    575: @virtualtest[]
                    576: $derived[^derived::create[derived create actual param]]
                    577: ^derived.test[]
                    578: 
1.119     paf       579: 
                    580: @voidpostest[]
                    581: $s[]
                    582: ^s.pos[$nothing]
1.118     paf       583: 
                    584: @postest[]
                    585: $s[$nothing]
                    586: ^s.pos[$nothing]
1.113     paf       587: 
1.115     paf       588: @cookieexpirestest[]
                    589: #$cookie:exptest[1]
                    590: #$cookie:exptest[$.value[2] $.expires(+1)]
                    591: $response:xxxx[^date::now(+10)]
                    592: $response:yyy[$.value[^date::now(+20)]]
                    593: $response:yyy[$.value[vvv] $.aaaa[^date::now(+20)]]
                    594: 
1.113     paf       595: @rbodytest[]
                    596: $request:body=
                    597: <form method=post>
                    598: <input type=submit name=paf value=123>
                    599: </form>
1.107     paf       600: 
                    601: @staticstest2[]
                    602: ^$derived:derived_var=$derived:derived_var<br>
                    603: ^$derived:a=$derived:a<br>
1.108     paf       604: $derived:a[changed] ^$derived:a=$derived:a<br>
1.107     paf       605: $derived:derived_var[changed] 
                    606: ^$derived:derived_var=$derived:derived_var<br>
                    607: 
1.105     paf       608: @staticstest[]
                    609: $derived[^derived::create[]]
                    610: ^derived.test[]
1.110     paf       611: <hr>
1.106     paf       612: ^$derived.a=$derived.a<br>
                    613: ^$derived.x=$derived.x<br>
1.110     paf       614: <hr>
                    615: ^if($derived is derived){derived is derived}{error: derived is not derived}<br>
                    616: ^if($derived is table){derived is table}{error:derived is not table}<br>
1.111     paf       617: <hr>
                    618: ^^eval(^$derived)=^eval($derived)<br>
                    619: ^^if(^$derived)=^if($derived){y}{n}<br>
1.106     paf       620: 
1.105     paf       621: 
1.104     paf       622: @xdoctypetest[]
                    623: $xdoc[^xdoc::create[x]]
                    624: ^if($xdoc is xdoc){y}{n}
                    625: 
                    626: @xtabletest[]
                    627: $xtableo[^xtable::create[]]
                    628: ^if($xtableo is table){y}{n}
1.105     paf       629: #^xtableo.columns[]
1.100     paf       630: 
1.103     paf       631: @monthdays[month]
                    632: $from[^date::create(2000;$month;1)]
                    633: $to[^date::create($from)] ^to.roll[month](+1)
                    634: $result($to-$from)
                    635: 
1.100     paf       636: @badconstructor[]
                    637: ^date::now[]
1.99      paf       638: 
                    639: @datesaving[]
                    640: $now[^date::now[]]
                    641: $now.daylightsaving<br>
                    642: $now.yearday<br>
                    643: #
                    644: $date[^date::create(2002;1;3)]
                    645: $date.daylightsaving<br>
                    646: $date.yearday
1.97      paf       647: 
1.98      paf       648: @mail4[]
                    649: ^mail:send[
                    650:        $.from[paf@mail.design.ru]
                    651:        $.to[paf@mail.design.ru]
1.156     paf       652:        $.subject[^taint[uri][москва=E0_+ ]=2]
1.98      paf       653:        $.text[^taint[uri][москва]=]
                    654:        $.html{<a href=http://there.ru/?city=^taint[uri][Москва]>link</a>}
                    655: ]
1.97      paf       656: @processtest[]
                    657:     $f[^file::load[text;piece.p]]      ^process{$f.text}
                    658:        $ORIGINS(1)
1.93      paf       659: 
                    660: 
                    661: @badpos[]
                    662: $s[123]
1.94      paf       663: ^s.mid(0;2)
1.92      paf       664: 
                    665: @wwrapperpass[]
                    666: $h[^hash::create[]]
                    667: $h.a(1)
                    668: ^my_method[^if(1){$h}]
                    669: работает. так и должно быть?
                    670: 
                    671: @my_method[p]
                    672: ^p._count[]
                    673: 
1.88      paf       674: 
                    675: @tableclonelimit[]
                    676: $source[^table::create{a
                    677: aa
                    678: bb
                    679: cc}]
                    680: ^source.offset(1)
                    681: #$dest[^table::create[$source]]
                    682: $dest[^table::create[$source;$.offset(2)]]
                    683: $dest[^table::create[$source;$.limit(2)]]
                    684: $dest[^table::create[$source;$.offset(1)$.limit(1)]]
                    685: $dest[^table::create[$source;$.offset(1)$.limit(2)]]
                    686: $dest[^table::create[$source;$.offset[cur]$.limit(2)]]
                    687: 
                    688: ^dest.menu{$dest.a}[,]<br>
                    689: 
                    690: @joinlimit[]
                    691: $source[^table::create{a
                    692: aa
                    693: bb
                    694: cc}]
                    695: ^source.offset(2)
                    696: $dest[^table::create{a
                    697: xx
                    698: }]
                    699: #^dest.join[$source]
                    700: #^dest.join[$source;$.offset(2)]
                    701: #^dest.join[$source;$.limit(2)]
                    702: #^dest.join[$source;$.offset(1)$.limit(1)]
                    703: #^dest.join[$source;$.offset(1)$.limit(2)]
1.91      paf       704: #^dest.join[$source;$.offset[cur]$.limit(1)]
                    705: ^dest.join[$source;$.limit(0)]
1.88      paf       706: 
                    707: ^dest.menu{$dest.a}[,]<br>
1.86      paf       708: 
                    709: @cgit[]
                    710: $f[^file::cgi[showenv.cmd]]
                    711: $f.HELLO=<br>
                    712: $f.CONTENT-TYPE=<br>
                    713: $f.content-type=<br>
                    714: 
1.83      paf       715: 
1.84      paf       716: @mimet[]
1.85      paf       717: $f[^file::stat[a.GIF]]
                    718: $f.content-type
1.84      paf       719: 
                    720: 
1.83      paf       721: @tfind[]
                    722: ^file:find[index.html]
                    723: 
                    724: @tstdin[]
                    725: $f[^file::exec[test.pl;$.stdin[проверка stdin потока]]]
                    726: <pre>$f.text</pre>
1.80      paf       727: 
                    728: @sergestrandef[]
                    729: $sQuantity[ ]
                    730: ^sQuantity.int(10)
1.78      paf       731: 
                    732: @xmltransformbyxdoc[]
                    733: $xdoc[^xdoc::set{^process{<?xml version="1.0" encoding="windows-1251"?>
                    734: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                    735: <people>
                    736:        <man id="1" имя="word слово">
                    737:                <name>1  2</name>
                    738:        </man>
                    739: </people>
                    740: }}]
                    741: $sheet[^xdoc::create{<?xml version="1.0"?> 
1.79      paf       742: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
                    743: 
                    744: >
1.78      paf       745: <!--<xsl:output doctype-public ="-//W3C//DTD XHTML" indent="yes"/>-->
                    746: 
1.79      paf       747:        <!--<xsl:import href="http://localhost/html.xsl"/>-->
                    748:        <xsl:import href="html.xsl"/>
                    749: 
1.78      paf       750: <xsl:param name="param1">defparam1</xsl:param>
                    751: <xsl:param name="param2">defparam2</xsl:param>
1.79      paf       752: 
1.78      paf       753: 
                    754:        <xsl:template match="doc">
                    755:                param1=<xsl:value-of select="^$param1"/><br/>
                    756:                param2=<xsl:value-of select="^$param2"/><br/>
                    757: 
                    758:                test return <something background=""/>
                    759:        </xsl:template>
                    760: 
                    761:        <xsl:template name="test">
1.81      paf       762:                test return3
1.78      paf       763:        </xsl:template>
                    764: 
                    765:   <xsl:template match="people">
                    766:      <html>
1.155     paf       767:      <head>
                    768: <link type='text/xml' rel='alternate' href='/Default.vsdisco'/>
                    769: z</head>
1.78      paf       770:                para1=<xsl:copy-of select="^$param1"/>
                    771:        <xsl:apply-templates/>
                    772:        <hr/>
                    773:        <xsl:call-template name="test"/>
                    774:      </html>   
                    775:   </xsl:template>
                    776: 
                    777:   <xsl:template match="name">
                    778:     <b><xsl:value-of select="."/></b>
                    779:   </xsl:template>
                    780: </xsl:stylesheet>
                    781: }]
                    782: 
                    783: 
                    784: $xdoc[^xdoc.transform[$sheet]]
                    785: $string[^xdoc.string[$.method[html]]]
                    786: ^string.save[a]
                    787: ^untaint[html]{$string}
                    788: 
                    789: 
1.77      paf       790: 
                    791: @tnormalize[]
                    792: #s состоит из 1000 фрагментов
                    793: $s[^for[i](0;999){фрагмент }]
                    794: #это займет много ресурсов
                    795: ^s.match[фраг][g]{перга}
                    796: #это займет меньше ресурсов
                    797: #$normalized[^s.normalize[]]
                    798: #^normalized.match[фраг][g]{перга}
1.74      paf       799: 
                    800: @sendtests[]
1.89      paf       801: ^text[]
1.74      paf       802: #^html[]
                    803: #^text-n-html[]
                    804: #^file[]
                    805: #^text-n-file[]
1.89      paf       806: #^text-n-html-n-file[]
1.74      paf       807: #^backwardcomp[]
                    808: 
                    809: @backwardcomp[]
                    810: ^mail:send[
                    811:        $.from[paf]
                    812:        $.to[paf]
                    813:        $.body[this is text value]
                    814: ]
                    815: 
                    816: @text[]
                    817: ^mail:send[
                    818:        $.from[paf]
1.90      paf       819:        $.to[paf]
1.74      paf       820:        $.text[
                    821:                $.value[this is text value]
                    822:        ]
                    823: ]
                    824: 
                    825: @html[]
                    826: ^mail:send[
                    827:        $.from[paf]
                    828:        $.to[paf]
                    829:        $.html{this is <b>html</b> value ^taint[<] 10}
                    830: ]
                    831: 
                    832: @text-n-html[]
                    833: ^mail:send[
                    834:        $.from[paf]
                    835:        $.to[paf]
                    836:        $.text[
                    837:                $.value[this is text value]
                    838:        ]
                    839:        $.html[
                    840:        $.value{this is <b>html</b> value ^taint[<] 10}
                    841:        ]
                    842: ]
                    843: 
                    844: @file[]
                    845: ^mail:send[
                    846:        $.from[paf]
                    847:        $.to[paf]
                    848:        $.file[^file::load[binary;image.jpg]]
                    849: ]
                    850: 
                    851: @text-n-file[]
                    852: ^mail:send[
                    853:        $.from[paf]
                    854:        $.to[paf]
                    855:        $.text[
                    856:                $.value[this is text value]
                    857:        ]
                    858:        $.file[^file::load[binary;image.jpg]]
                    859: ]
                    860: 
                    861: @text-n-html-n-file[]
                    862: ^mail:send[
                    863:        $.from[paf]
                    864:        $.to[paf]
                    865:        $.text[
                    866:                $.value[this is text value]
                    867:        ]
                    868:        $.html[
                    869:        $.COntent-type[$.value[text/html]$.charset[windows-1251xx]]
                    870:        $.value{this is <b>html</b> value ^taint[<] 10}
                    871:        ]
                    872:        $.file[^file::load[binary;image.jpg]]
                    873: ]
                    874: 
                    875: 
                    876: 
                    877: @md5salt[]
                    878: 1234
                    879: 
                    880: @cryptdocsample[]
                    881: $users[^table::create{name     password
                    882: alice  ***
                    883: bob    ***
                    884: }]
                    885: 
                    886: $htpasswd[^table::create[nameless]{}]
                    887: ^users.menu{
                    888:        ^htpasswd.append{$users.name:^math:crypt[$users.password;^$apr1^$^md5salt[]]}
                    889: }
                    890: 
                    891: ^htpasswd.save[nameless;.htpasswd-parser-test]
                    892: 
1.73      paf       893: 
                    894: @tcrypt[]
1.76      paf       895: #^math:crypt[123;^$apr1^$1234567890abcdef]<br>
                    896: ^math:crypt[123;^$apr1^$]<br>
1.72      paf       897: 
                    898: @tfilespec[]
                    899: src=$selffilespec<br>
                    900: dirname=^file:dirname[$selffilespec]<br>
                    901: basename=^file:basename[$selffilespec]<br>
                    902: justname=^file:justname[$selffilespec]<br>
                    903: justext=^file:justext[$selffilespec]<br>
1.68      paf       904: 
                    905: @datecreatestring3[]
                    906: $new_after[^date::now(-3)]
                    907: $articles[^table::create{id    title   last_update
                    908: 1      привет  2002-07-03}]
                    909: ^articles.menu{
                    910:     $last_update[^date::create[$articles.last_update]]
                    911:     <a href=${articles.id}.html>$articles.title</a>
                    912:     ^if($last_update > $new_after){новая}
                    913:     <br>
                    914: }
1.67      paf       915: 
                    916: @div[]
                    917: $var(5)
                    918: ^var.inc(7)
                    919: ^var.dec(3)
                    920: ^var.div(4)
                    921: ^var.mul(2)
                    922: $var
                    923: 
                    924: 
                    925: @xdocsave[]
                    926: $document[^xdoc::create{<?xml version="1.0" encoding="windows-1251" ?>
                    927: <document>
                    928: строка1<br/>
                    929: строка2<br/>
                    930: </document>}]
                    931: ^document.save[test.xml]
                    932: 
                    933: @xdocstring[]
                    934: $document[^xdoc::create{<?xml version="1.0" encoding="windows-1251" ?>
                    935: <document>
                    936: строка1<br/>
                    937: строка2<br/>
                    938: </document>}]
                    939: ^document.string[
                    940:     $.method[html]
                    941: ]
                    942: 
                    943: 
                    944: @xdocload[]
                    945: $document[^xdoc::load[article.xml]]
                    946: $response:body[^document.file[$.media-type[text/xml]]]
                    947: 
                    948: 
                    949: @xdoccreatetag[]
                    950: $document[^xdoc::create[document]]
                    951: $paraNode[^document.createElement[para]]
                    952: $dummy[^document.documentElement.appendChild[$paraNode]]
                    953: $response:body[^document.file[$.media-type[text/xml]]]
                    954: 
                    955: 
                    956: @xdoccreate[]
                    957: $document[^xdoc::create{<?xml version="1.0" encoding="windows-1251" ?>
                    958: <document>
                    959: текст
                    960: </document>}]
                    961: $response:body[^document.file[$.media-type[text/xml]]]
                    962: 
                    963: @selectBool2[]
                    964: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
                    965: <t attr="привет" n="123"/>}]
                    966: ^if(^d.selectBool[/t/@n > 10]){
                    967:     /t/@n больше 10
                    968: }{
                    969:     не больше
                    970: }
                    971: 
                    972: 
                    973: @selectNumber2[]
                    974: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
                    975: <t attr="привет" n="123"/>}]
                    976: ^d.selectNumber[number(/t/@n)+1]<br>
                    977: ^d.selectNumber[2*2]<br>
                    978: 
                    979: 
                    980: @selectString2[]
                    981: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
                    982: <t attr="привет" n="123"/>}]
                    983: # результат=привет
                    984: ^d.selectString[string(t/@attr)]
                    985: 
                    986: 
                    987: @selectSingle2[]
                    988: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
                    989: <t attr="привет" n="123"/>}]
                    990: # результат=один элемент "t"
                    991: $element[^d.selectSingle[t]]
                    992: # результат=2 (количество атрибутов <t>)
                    993: Количество атрибутов: ^element.attributes._count[]<br>
                    994: # результат=не существует (нет <x>)
                    995: ^if(^d.select[x]){
                    996:     x существует
                    997: }{
                    998:     x не существует
                    999: }
                   1000: 
                   1001: @select2[]
                   1002: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><t attr="привет" n="123"/>}]
                   1003: # результат: список из одного элемента "t"
                   1004: $list[^d.select[t]]
                   1005: # результат: 2 = количество атрибутов <t>
                   1006: ^list.0.attributes._count[]<br>
                   1007: ^for[i](0;$list-1){
                   1008:     $attr[$list.$i]
                   1009:     $attr.nodeName = $attr.nodeType<br>
                   1010: }
                   1011: 
                   1012: 
                   1013: @selectt[]
                   1014: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><t attr="привет" n="123"/>}]
                   1015: $list[^d.select[t]]
                   1016: ^list.0.attributes._count[]
1.65      paf      1017: 
                   1018: @envt[]
1.66      paf      1019: $f[^file::exec[showenv.cmd;
                   1020:        $.bad[value]
                   1021:        $.CGI_good[value]
                   1022: ]]
1.65      paf      1023: $f.status<br>
                   1024: $f.stderr<br>
                   1025: <pre>$f.text</pre>
                   1026: 
1.63      paf      1027: 
                   1028: @tserge[]
1.64      paf      1029: ^if(" 09 "){y}
1.61      paf      1030: 
                   1031: @datetest[]
                   1032:        $f[^file::stat[some.zip]]
                   1033: Размер в байтах: $f.size<br>
                   1034: Год создания: $f.cdate.year<br>
                   1035: $now[^date::now[]]
                   1036: $DAYS_CONSIDERED_NEW(3)
                   1037: Статус: ^if($f.mdate >= $now-$DAYS_CONSIDERED_NEW){новый;старый}
                   1038: 
1.60      paf      1039: 
                   1040: @checkList[]
                   1041: ...^oneOf[a;a,b,c]...<br>
                   1042: #...^oneOf[a;ax,b,c]...<br>
                   1043: ...^oneWord[word]...<br>
                   1044: #...^oneWord[wo rd]...<br>
                   1045: 
                   1046: 
                   1047: @oneOf[s;list][t] выдаёт строку, если строка она есть в списке(разделенном запятыми)
                   1048: $t[^list.lsplit[,]]
                   1049: ^if(!^t.locate[piece;$s]){^throw[user;$s;unknown]}
                   1050: $result[$s]
                   1051: 
                   1052: @oneWord[s]
                   1053: ^if(^s.match[\W]){^throw[user.data;$s;not word]}{$s}
1.59      paf      1054: 
                   1055: @pngsize[]
                   1056: $i[^image::measure[test.png]]
                   1057: ^i.html[]
                   1058: 
                   1059: 
                   1060: @forkeys[]
                   1061: $text[^form:fields.foreach[key;val]{$key=$val
                   1062: }]
                   1063: ^text.save[ttt.txt]
                   1064: =$text=
                   1065: 
                   1066: 
                   1067: @tstoredproc2[]
                   1068: ^connect[odbc://DSN=nestle^;UID=nestle^;PWD=mbm32]{
                   1069:        ^void:sql{exec pafvoid}
                   1070: }
                   1071: 
                   1072: @tstoredproc[]
                   1073: ^connect[odbc://DSN=nestle^;UID=nestle^;PWD=mbm32]{
                   1074:        $t[^table::sql{exec pafproc}]
                   1075: #      $t[^table::sql{{call pafproc}}]
                   1076:        $c[^t.columns[]]
                   1077:        ^c.menu{$c.column}[<br>]
                   1078: }
1.57      paf      1079: 
                   1080: @datecreatestring2[]
1.58      paf      1081: <table border=1>
                   1082: ^datecreatestring2show[2000]
                   1083: ^datecreatestring2show[2000-02]
1.59      paf      1084: ^datecreatestring2show[2000-2-03]
1.58      paf      1085: ^datecreatestring2show[2000-02-03 15]
                   1086: ^datecreatestring2show[2000-02-03 15:30] 
                   1087: ^datecreatestring2show[2000-02-03 15:30:04] 
                   1088: ^datecreatestring2show[2000-02-03 15:30:04 hren] 
                   1089: ^datecreatestring2show[15:30] 
                   1090: ^datecreatestring2show[15:30:05] 
                   1091: ^datecreatestring2show[15:30:05 hren] 
                   1092: </table>
                   1093: 
                   1094: @datecreatestring2show[s]
                   1095: $date[^date::create[$s]]
                   1096: <tr>
                   1097: <td>$s</td><td align=right>^date.sql-string[]</td>
                   1098: </tr>
                   1099: 
1.57      paf      1100: 
                   1101: @junctionprob[][l]
                   1102: $l[123]
                   1103: $a{$l}
                   1104: ^junctionprobnested[$a]
                   1105: @junctionprobnested[p]
                   1106: $p
                   1107: 
                   1108: 
                   1109: @callindirecttarget[]
                   1110: callindirecttarget called
                   1111: @callindirect[]
                   1112: $f[$callindirecttarget]
                   1113: ^f[]
                   1114: 
                   1115: @xpath2[]
                   1116: $xdoc[^xdoc::create{<?xml version="1.0" encoding="windows-1251"?>
                   1117: <doc>
                   1118: <field-list>
                   1119: <field name="aa"/>
                   1120: <field name="bb"/>
                   1121: </field-list>
                   1122: </doc>
                   1123: }]
                   1124: 
                   1125: #^xdoc.string[]
                   1126: 
                   1127: $fieldList[^xdoc.selectSingle[/doc/field-list]]
                   1128: #^fieldList.childNodes._count[]
                   1129: $fields[^fieldList.select[field]]
                   1130: #^fields._count[]
                   1131: ^fields.foreach[k;node]{
                   1132:        $node.nodeName<br>
                   1133: }
                   1134: @counter[filespec][f;s]
                   1135: ^file:lock[$filespec]{
                   1136:        $f[^file::load[text;$filespec]]
                   1137:        $s[^eval($f.text+1)]
                   1138:        ^s.save[$filespec]      
                   1139: }
                   1140: $s
1.56      paf      1141: 
                   1142: @xmlspace[]
                   1143: $xdoc[^xdoc::set{^process{<?xml version="1.0" encoding="windows-1251"?>
                   1144: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                   1145: <people>
                   1146:        <man id="1" имя="word слово">
                   1147:                <name>1  2</name>
                   1148:        </man>
                   1149: </people>
                   1150: }}]
                   1151: $xdoc[^xdoc.transform[global.xsl]]
                   1152: $string[^xdoc.string[$.method[html]]]
                   1153: ^string.save[a]
                   1154: ^untaint[html]{$string}
                   1155: 
                   1156: @badthrows[]
                   1157: #^throw[a;b;]
                   1158: ^throw[a;]
1.54      paf      1159: 
                   1160: @mssqltypes1[]
                   1161: ^connect[odbc://DSN=nestle^;UID=nestle^;PWD=mbm32]{
1.55      paf      1162: #    ^string:sql{select { ts '1998-05-02 01:23:56.123' }}
                   1163: #    ^string:sql{select CAST({ ts '1998-05-02 01:23:56.123' }AS smalldatetime)}
                   1164: #      ^string:sql{select CAST({ts '2002-04-28 00:00:00.000'} AS smalldatetime)}
                   1165:        $t[^table::sql{select a from paf}]
                   1166:        ^t.count[]
1.54      paf      1167: }
1.51      paf      1168: 
1.53      paf      1169: @datecreatestring[]
1.54      paf      1170: $d[^date::create[2002-04-33 01:03:04]]
1.53      paf      1171: ^d.sql-string[]
1.52      paf      1172: 
                   1173: @method[hash]
                   1174: $hash.key
                   1175: @mainZ[]
                   1176: ^method[
                   1177:     $.key{code}
                   1178: ]
                   1179: 
1.51      paf      1180: @tablehasht[]
                   1181: $t[^table::create{p
                   1182: 1
                   1183: 3
                   1184: 2
                   1185: 4}]
                   1186: 
                   1187: $h[^t.hash[p]]
                   1188: 
                   1189: =^h._count[]=
                   1190: 
                   1191: 
                   1192: @sqldefaults[]
                   1193: ^connect[mysql://mdm:4b833ljq@db-mysql/mdm]{
                   1194:        ^int:sql{select news_id from news where news_id=-1}[$.default{2}]<br>
                   1195:     ^string:sql{select news_id from news where news_id=-1}[$.default{2}]
                   1196: }
1.60      paf      1197: =======
                   1198: <hr>
                   1199: OK
                   1200: >>>>>>> 1.50
1.48      paf      1201: 
                   1202: @tcrashlocaljunctionsv2[]
                   1203: $a[
                   1204:        $b{  $c[1] }
                   1205: ]
                   1206: $b
                   1207: $c
                   1208: 
                   1209: @tcrashlocaljunctions[]
                   1210: $var[aaa]
                   1211: ^if(1){
                   1212: ^tcrashlocaljunctions1[]
                   1213: }
                   1214: 
                   1215: $j
                   1216: 
1.49      paf      1217: @tcrashlocaljunctions1[][var]
                   1218: $var[varvalue]
1.48      paf      1219:        $j{
                   1220:                $var
                   1221:        }
1.49      paf      1222: $j
1.48      paf      1223: 
                   1224: @tjunctions[][tl]
                   1225: $t[^t::create[]]
                   1226: ^tjunctionsi[]
                   1227: 
                   1228: @tjunctionsi[][tl]
                   1229: $tl[12345]
                   1230: ^t.tjunctionsm[
                   1231:        $.key{
                   1232:                $tl
                   1233:        }
                   1234: ]
1.46      paf      1235: 
1.47      paf      1236: @replacetest[]
                   1237: $b[b]
                   1238: $s[
                   1239: aaaaaaaaaa${b}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1240: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa${b}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1241: ]
                   1242: ^s.replace[^table::create{from to
                   1243: ba     !_}]
                   1244: 
                   1245: 
1.46      paf      1246: @matchoptionpp[]
1.47      paf      1247: #$ORIGINS(1)
1.46      paf      1248: $s[
                   1249: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1.47      paf      1250: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1251: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1252: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1253: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1254: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1255: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1256: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1257: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   1258: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1.46      paf      1259: ]
                   1260: ^s.match[b;g']{($match.prematch|$match.match|$match.postmatch)}
                   1261: 
1.44      paf      1262: 
                   1263: @txdocxnodechild[]
                   1264: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?><d/>}]
                   1265: $xdoc.nodeName
                   1266: ^xdoc.selectNumber[2*2]
1.45      paf      1267: $xdoc:ELEMENT_NODE
1.44      paf      1268: 
                   1269: 
                   1270: @tclasses[]
                   1271: $t[^t::create[]]
                   1272: ^t.method[]
                   1273: <hr>
                   1274: ^t.base_method[]
                   1275: 
1.40      paf      1276: 
                   1277: @errort[]
1.42      paf      1278: ^xdoc::create[a]
1.40      paf      1279: #^throw[user;here;this]
                   1280: 
                   1281: @tselectNumber[]
                   1282: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><d attr="привет" n="123"/>}]
                   1283: ^d.selectString[string(d/@attr)]<br>
                   1284: ^d.selectNumber[2*2]<br>
                   1285: ^d.selectNumber[number(/d/@n)+1]<br>
                   1286: 
1.34      paf      1287: 
1.36      paf      1288: @invaliddate2[]
                   1289: $d[^date::create(1018946575/60/60)] ^d.sql-string[]
                   1290: 
                   1291: @process2[]
                   1292: ^^process{
                   1293:        ^process{
                   1294:                ^$a[^^if(0){^$.k[y]}{^$.k[^^hren[]n]}] ^$a.k
                   1295:        }
                   1296: }
                   1297: 
1.35      paf      1298: @casehashtext[]
                   1299: $tt[1]
                   1300: $tmp[
                   1301:         ^switch[$tt]{
                   1302:                 ^case[1]{
                   1303:                         $.aaa[123]
                   1304:                 }
                   1305:                 ^case[DEFAULT]{
                   1306:                         $.bbb[456]
                   1307:                 }
                   1308:         }
1.36      paf      1309:         shit!
1.35      paf      1310: ]
1.36      paf      1311: #$tmp
1.35      paf      1312: $tmp.aaa
                   1313: 
                   1314: @subjvaltest[]
                   1315: $a12[val]
                   1316: $b[12]
                   1317: $a$b
                   1318: 
1.34      paf      1319: @tableselect0[]
                   1320: $person[^table::create{name    height
                   1321: paf    1.77
                   1322: шохин  2.07
                   1323: moko   1.77
                   1324: }]
                   1325: $nottoohigh[^person.select($person.height<2)]
                   1326: ^nottoohigh.menu{$nottoohigh.name<br>}
1.32      paf      1327: 
                   1328: @transparams[]
                   1329: $idoc[^xdoc::create{<?xml version="1.0" ?><doc/>}]
                   1330: $odoc[^idoc.transform[global.xsl;
                   1331:        $.param1['1']
                   1332:        $.param2['2']
                   1333: ]]
                   1334: <pre>^taint[^odoc.string[$.method[html]]]
                   1335: 
                   1336: @memnotest1[]
                   1337: ^for[i](0;4000){
                   1338: 
                   1339:  $xxxx[$i]
                   1340:  $xxxx
                   1341: 
                   1342: }
                   1343: 
                   1344: @memnotest1notes[]
                   1345: одна итерация цикла:
                   1346: [Mon Apr  8 20:12:02 2002] execution-------------------------|
1.35      paf      1347: '469641+=28 wcodeframe -> 0 !optimize[3]''469669+=49 string от {} -> 0 optimize[3]'
1.32      paf      1348: [Mon Apr  8 20:12:02 2002] 12:STRING__WRITE
                   1349: [Mon Apr  8 20:12:02 2002]  "|| "
                   1350: [Mon Apr  8 20:12:02 2002] 12:WITH_ROOT
                   1351: [Mon Apr  8 20:12:02 2002] 13:VALUE
                   1352: [Mon Apr  8 20:12:02 2002]  "xxxx" string
1.35      paf      1353: [Mon Apr  8 20:12:02 2002] 14:CREATE_EWPOOL'469377+=24 wcodeframe -> 0 !optimize[1]''469401+=49 string -> 41 !optimize[7]'
1.32      paf      1354: [Mon Apr  8 20:12:02 2002] 16:WITH_READ
                   1355: [Mon Apr  8 20:12:02 2002] 17:VALUE
                   1356: [Mon Apr  8 20:12:02 2002]  "i" string
                   1357: [Mon Apr  8 20:12:02 2002] 18:GET_ELEMENT
1.35      paf      1358: [Mon Apr  8 20:12:02 2002] 17:WRITE_VALUE'469452+=40 MAX_NUMBER -> !~2 actual digits''469492+=49 -> 41 !'
                   1359: [Mon Apr  8 20:12:02 2002] 16:REDUCE_EWPOOL'469541+=24 VString -> 0 optimize[5]'
1.32      paf      1360: [Mon Apr  8 20:12:02 2002] 15:CONSTRUCT_VALUE
                   1361: [Mon Apr  8 20:12:02 2002] 12:STRING__WRITE
                   1362: [Mon Apr  8 20:12:02 2002]  "| "
                   1363: [Mon Apr  8 20:12:02 2002] 12:WITH_READ
                   1364: [Mon Apr  8 20:12:02 2002] 13:VALUE
                   1365: [Mon Apr  8 20:12:02 2002]  "xxxx" string
                   1366: [Mon Apr  8 20:12:02 2002] 14:GET_ELEMENT
                   1367: [Mon Apr  8 20:12:02 2002] 13:WRITE_VALUE'469573+=41 string expand nothing for now'
                   1368: [Mon Apr  8 20:12:02 2002] 12:STRING__WRITE
1.35      paf      1369: [Mon Apr  8 20:12:02 2002]  "||"'469617+=24 VString -> 0 !optimize[6]'
1.32      paf      1370: [Mon Apr  8 20:12:02 2002] <-ja returned
                   1371: [Mon Apr  8 20:12:02 2002] ja->
                   1372: 
                   1373: 201/328=0.612804878049 %%optimized
                   1374: 
                   1375: 1.
                   1376: CREATE_*POOL
                   1377:     сделать
                   1378: *POOL_POOLED+CODE
                   1379:     где
                   1380:         wwrapper
                   1381:         и(возможно) wcodeframe
                   1382:         +string
                   1383:         стековая переменная
                   1384: 
                   1385: 2.
                   1386: избавиться от обёртки при возврате результата process [см. тело _for]
                   1387: 
                   1388: 3.
                   1389: сделать callback для process, чтобы вынести invariants из _for & co.
                   1390: 
                   1391: 4.
                   1392:  @todo склеить get_element и write_value (при вставлении? write_value)
                   1393: 
                   1394: 5.
                   1395: reduce_*pool -> вариант получить именно string, без VString обёртки [часто
                   1396: обёртка сразу выбрасывается = не нужна]
                   1397: 
                   1398: 6.
                   1399: process вариант получить именно string, без VString обёртки [часто обёртка
                   1400: сразу выбрасывается = не нужна]
                   1401: 
                   1402: 7.
                   1403: string head, убить 8 байт неправильной link
1.31      paf      1404: 
                   1405: @voidparams[]
                   1406: ^voidparamsm[$form:field]
                   1407: 
                   1408: @voidparamsm[p]
                   1409: ^p.int(123)
1.29      paf      1410: 
1.30      paf      1411: @rolls2[]
                   1412: $now[^date::now[]]
                   1413: $d[^date::create($now.year;$now.month)] ^d.sql-string[]<br>
                   1414: ^for[i](1;12){
                   1415:        ^d.roll[month](-1) ^d.sql-string[]<br>
                   1416: }
                   1417: 
1.29      paf      1418: @cacheexpireschanging[]
                   1419: ^cache[$DB_HOME/keyключ][^date::now(+1)]{ ^rem{1 day}
                   1420:     ^cache[^date::now(+4/24/60/60)]
                   1421: #    ^cache(2)
1.30      paf      1422: #    ^cache(0)
1.29      paf      1423:        ^math:random(100)
                   1424: }
                   1425: 
                   1426: 
                   1427: 
                   1428: @cacheexpiresfixed[]
                   1429: ^cache[$DB_HOME/keyключ][^date::now(+2/24/60/60)]{
                   1430:        ^math:random(100)
                   1431: }
                   1432: 
                   1433: @dateoffsets[]
                   1434: $d[^date::create(^date::now[]+1/24/60)]
                   1435: #$d[^date::now(+1/24/60)]
                   1436: ^d.sql-string[]
                   1437: #$d
1.26      paf      1438: 
1.28      paf      1439: @exceptionTypes[]
                   1440: #    parser.compile       ^test[}                компиляция (непарная скобка, ...)
                   1441: #    parser.runtime       ^if(0).                параметры (больше/меньше, чем нужно, не тех типов, ...)
                   1442: #    number.zerodivision  ^eval(1/0) ^eval(1%0)
                   1443: #    number.format        ^eval(abc*5)
                   1444: #    file.missing         ^file:delete[delme]                       not found
                   1445: #    file.access          ^table::load[.]                       no rights
                   1446: #    image.format         ^image::measure[index.html]                        not gif/jpg
                   1447: #    sql.connect          ^connect[mysql://baduser:pass@host/db]{}                       not found/timeout
                   1448: #    sql.execute          ^connect[mysql://okuser:pass@host/db]{^void:sql{select bad}}                       syntax error
                   1449: #    xml                  ^xdoc::create{<forgot?>}                       any error in xml/xslt libs
                   1450: #    smtp.connect                                not found/timeout
                   1451: #    smtp.execute                                communication error
                   1452: 
1.26      paf      1453: @roll2[]
                   1454: $d[^date::create(2002;4;2;2;2;3)] ^d.sql-string[]<br>
1.27      paf      1455: ^d.roll[day](+365*3+1) ^d.sql-string[]<br>
1.26      paf      1456: 
1.25      paf      1457: 
                   1458: @rolls[]
                   1459: $d[^date::create(2002;4;4)]
                   1460: ^d.sql-string[]<br>
                   1461: ^for[i](1;7){
                   1462: ^d.roll[day](-1)
                   1463: ^d.sql-string[]<br>
                   1464: }
                   1465: <hr>
                   1466: $d[^date::create(2002;3;28)]
                   1467: ^d.sql-string[]<br>
                   1468: ^for[i](1;7){
                   1469: ^d.roll[day](+1)
                   1470: ^d.sql-string[]<br>
                   1471: }
                   1472: <hr>
                   1473: $d[^date::create(2002;12;3)]
                   1474: ^d.sql-string[]<br>
                   1475: ^for[i](1;14){
                   1476: ^d.roll[day](-1)
                   1477: ^d.sql-string[]<br>
                   1478: }
                   1479: <hr>
                   1480: $d[^date::create(2002;10;19)]
                   1481: ^d.sql-string[]<br>
                   1482: ^for[i](1;14){
                   1483: ^d.roll[day](+1)
                   1484: ^d.sql-string[]<br>
                   1485: }
                   1486: 
                   1487: 
                   1488: 
                   1489: 
                   1490: 
1.22      paf      1491: 
                   1492: @exceptions1[]
                   1493: ^try{
                   1494:        aaa
1.24      paf      1495:        ^throw[custom1;paf;is stupid]
1.22      paf      1496: }{
1.24      paf      1497:        ^if($exception.type eq custom1){
1.28      paf      1498: #              $exception.handled(1)
                   1499:        ^throw[$exception]
1.24      paf      1500:                type=$exception.type<br>
                   1501:            source=$exception.source<br>
                   1502:            file=$exception.file<br>
                   1503:            lineno=$exception.lineno<br>
                   1504:        comment=$exception.comment<br>
                   1505:        }
1.22      paf      1506: }
1.21      paf      1507: 
                   1508: @locate_by_expr[]
                   1509: $t[^table::create{a    b
                   1510: 1      nok
                   1511: 2      ok
                   1512: 3      nok
                   1513: }]
                   1514: ^if(^t.locate($t.a==2)){$t.b}{n}
1.17      paf      1515: 
                   1516: @method_junction_params[param]
                   1517: ^if($param is junction){junction}{ne junction}
                   1518: 
                   1519: @verifyCookie[value] 
                   1520: ^if($cookie:dummyvote eq $value){ 
                   1521:        $result(1) 
                   1522: }{ 
                   1523:        $cookie:dummyvote[$value] 
                   1524:        $result(0) 
                   1525: }
1.16      paf      1526: 
                   1527: @execlangs[]
1.20      paf      1528: $f[^file::exec[test.pl]]
1.36      paf      1529: err:$f.stderr<br>
1.16      paf      1530: ^process{$f.text}
                   1531: #$c[^t.columns[]]
                   1532: #^c.menu{
                   1533: #* $c.column<br>
                   1534: #}
1.36      paf      1535: c:$t.c<br>
1.16      paf      1536: 
                   1537: @tobjeresult[]
                   1538: ^table::create{a
                   1539: 12}
1.15      paf      1540: 
                   1541: @xmlprobs[]
                   1542: $xmlDataType[^xdoc::load[program.xml]]
                   1543: #<pre>^taint[^xmlDataType.string[]]
                   1544: $xmlDataTypes[^xmlDataType.select[programs/program[@id=4]/data]]
                   1545: #=^xmlDataTypes._count[]=
                   1546: =^xmlDataTypes.0.getAttribute[type-id]=
                   1547: 
                   1548: @doubleprobs[]
                   1549: $1(^math:radians(180))
                   1550: $2($math:PI)
                   1551: ^if(^1.format[%.10f]==^2.format[%.10f]){y;n}
                   1552: ^if($1==$2){y;n}
                   1553: ^if(^math:radians(180)==$math:PI){y;n}
                   1554: 
                   1555: 
                   1556: @divnamestop[]
                   1557: $a(10)
                   1558: ^eval($a\3)
                   1559: 
                   1560: @arrayclone[]
                   1561: $t[^table::create{a    b
                   1562: 1      11
                   1563: 2      22
                   1564: }]
                   1565: $c[^table::create[$t]]
                   1566: ^c.append{2    33}
                   1567: ^t.count[]
                   1568: ^c.count[]
                   1569: 
                   1570: @operator_tricks[]
                   1571: ^if(1){$a[^t[]]}
                   1572: $a!
                   1573: $a($b)
                   1574: ^if(1){y}{n}
                   1575: $MAIN:a(^t[] eq OK)
                   1576: #$MAIN:a(1)
                   1577: ^if($a){y}{n}
                   1578: #^if(1){y}{n}
                   1579: $form:if
                   1580: $a[$.n[1]]
                   1581: $a.if
                   1582: 
                   1583: @xoutputrusattr[]
                   1584: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><d attr="привет"/>}]
                   1585: ^show_xdoc2[$d]
                   1586: 
                   1587: @xdocset1[]
                   1588: $d[^xdoc::set{<?xml version="1.0"?><d>=^taint[&]=</d>}]
                   1589: ^show_xdoc2[$d]
                   1590: 
                   1591: @regexp3[]
                   1592: $s[abcАБВ]
                   1593: ^if(^s.match[][i]){y}{n}
                   1594: 
                   1595: 
                   1596: @exec2[]
                   1597: $a[^file::exec[bin/t.cmd]]
                   1598: <pre>^taint[$a.text]</pre>|$a.status|$a.stderr<hr>
                   1599: 
                   1600: 
                   1601: @tlock[]
                   1602: ^file:lock[lockfile]{
                   1603:        code
                   1604: }
                   1605: 
                   1606: @xmloutattrwithoutvalue[]
                   1607: #$ORIGINS(1)
                   1608: $doc[^xdoc::set{<?xml version="1.0"?><doc background="">zz</doc>}]
                   1609: $doc[^doc.transform[global.xsl]]
                   1610: =^taint[html][^doc.string[$.method[html]]]=
                   1611: 
                   1612: 
                   1613: 
                   1614: @precisionProblem[]
                   1615: $a[123456789012345678901234567890]
                   1616: $b(^a.double[])
                   1617: ^b.format{%.20E}
                   1618: <hr>
                   1619: ^eval(2*2)
                   1620: 
                   1621: @xpath[]
                   1622: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                   1623: <document><block><p>привет</p></block></document>
                   1624: }]
                   1625: #^show_xdoc2[$xdoc]
                   1626: $node[^xdoc.selectSingle[/document/block/p]]
                   1627: ^if(def $node){
                   1628:        ^if($node is string){
                   1629:                $node
                   1630:        }{
                   1631:        ^if($node is hash){
                   1632:                ^node._count[]
                   1633:        }{
                   1634:                $node.nodeType
                   1635:        }
                   1636:        }
                   1637: #$node.firstChild.nodeValue
                   1638: }{
                   1639:        node not found
                   1640: }
                   1641: 
                   1642: 
                   1643: @ttablesetlang[]
                   1644: $a-tab-b[a     b
                   1645: 1      2]
                   1646: 
                   1647: $t[^table::set{$a-tab-b}]
                   1648: =$t.a=
                   1649: <hr>
                   1650: 
                   1651: $t[^table::set[nameless]{^taint[$a-tab-b]}]
                   1652: =$t.0=
                   1653: <hr>
                   1654: 
                   1655: $t[^table::set{^untaint{^taint[$a-tab-b]}}]
                   1656: =$t.a=
                   1657: 
                   1658: #^t.append{1   2}
                   1659: 
                   1660: @mail3[]
                   1661: ^mail:send[
1.98      paf      1662:        $.from[Александр Петросян <paf@mail.design.ru>]
                   1663:        $.to[Александр Петросян <paf@mail.design.ru>]
                   1664:        $.subject[проверка2]
1.15      paf      1665:        $.body[
                   1666:                $.text[
                   1667:                        $.content-type[$.value[text/plain] $.charset[windows-1251]]
1.98      paf      1668:                        $.body[проверка^taint[uri][москва]=]
1.15      paf      1669:                ]
                   1670:                $.attachment[
                   1671:                        $.value[^file::load[text;index.html]]
                   1672:                        $.file-name[привет всем.html]                   
                   1673:                ]
                   1674:        ]
                   1675: ]
                   1676: 
                   1677: 
                   1678: @ttime[]
                   1679: $now[^date::now[]]
                   1680: $now.hour:$now.minute
                   1681: 
                   1682: @tupper[]
                   1683: $t[abcABCабвАБВ]
                   1684: $t<br>
                   1685: ^t.upper[]
                   1686: 
                   1687: @treplace[]
                   1688: $copy-paste-clean[^table::set{a b
                   1689: .      _
                   1690: ,      _
                   1691: +      _
                   1692: &      _
                   1693: ?      _
                   1694: =      _}]
                   1695: 
                   1696: $cache_key[^taint[в.а,с+я]&был?тут=недавно.cache]
                   1697: # почему-то этот replace роняет апач в 500 ошибку :(
                   1698: #^cache_key.replace[$copy-paste-clean]
                   1699: $test[abc]
                   1700: ^test.save[$cache_key]saved<br>
                   1701: $cache[^file:list[.;\.cache^$]]
                   1702: ^file:delete[$cache_key]deleted($cache.name)<br>
                   1703: 
                   1704: 
                   1705: 
                   1706: @xslt2[]
                   1707: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                   1708: <document><block><p>привет</p></block></document>
                   1709: }]
                   1710: ^show_xdoc2[$xdoc]
                   1711: ^show_xdoc2[^xdoc.transform[templates/_document.xslt]]
                   1712: <hr>
                   1713: 
                   1714: 
                   1715: @tcache2[]
                   1716: ^cache[$DB_HOME/keyключ](2){
                   1717:        ^math:random(100)
                   1718: }
                   1719: 
                   1720: @ttaintuntaint[]
                   1721: <!-- некий панковский заголовок с буковкой C в круглых скобках -->^taint[html][
                   1722: 
                   1723: ]zz
                   1724: <hr>
                   1725: ^untaint[html]{1^taint[  ]2  3}
                   1726: 
                   1727: 
                   1728: @tappend2[]
                   1729: $t[^table::set{a       b}]^t.append{1  2}$t.a
                   1730: 
                   1731: @badvsnprintf[]
                   1732: ^connect[zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz]{
                   1733: }
                   1734: 
                   1735: 
                   1736: @badoracequoting[]
                   1737: $SQL.connect-string[oracle://webspb:webpwd@mts?NLS_LANG=RUSSIAN_AMERICA.CL8MSWIN1251&NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS]
                   1738: ^connect[$SQL.connect-string]{
                   1739: ^void:sql{delete from paf}
                   1740: ^void:sql{insert into paf values (1, '$form:text')}
                   1741: $paf[^table::sql{select * from paf}]
                   1742: ^paf.menu{
                   1743:        $paf.id: ^untaint{$paf.block}<hr>
                   1744: 
                   1745: }
                   1746: <hr>
                   1747: 
                   1748: 
                   1749: ^rem{
                   1750: $news[^table::sql{select description from news}[$.limit(3)]]
                   1751: ^news.menu{
                   1752:        ^untaint{$news.description}<hr>
                   1753: 
                   1754: }
                   1755: <hr>
                   1756: }
                   1757: 
                   1758: $tables[^table::sql{select table_name from user_tables}]
                   1759: ^tables.menu{
                   1760: $tables.table_name<br>
                   1761: }
                   1762: 
                   1763: }
                   1764: <hr>
                   1765: $env:PATH
                   1766: 
                   1767: @badconstructors[]
                   1768: $bred[^string::length[]]
                   1769: $bred[^response::clear[]]
                   1770: $bred[^int::int[]]
                   1771: 
                   1772: 
                   1773: @xloadwrongtable[]
                   1774: $constr[^xdoc::load[wrongtable.xml]]
                   1775: ^show_xdoc2[$constr]
                   1776: 
                   1777: @xsetwrongtable[]
                   1778: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251z" ?>
                   1779: <block-list>^untaint[as-is]{$constructor}</block-list>}]
                   1780: 
                   1781: 
                   1782: @tablecolumnerror[]
                   1783: $t[^table::set{a}]
                   1784: $t.$a
                   1785: 
                   1786: @roll[]
                   1787: #$date[^date::set(1970;1;2)]
                   1788: #^date.roll[month](-1)
                   1789: $date[^date::set(2038;1;1)]
                   1790: ^date.roll[month](+1)
                   1791: $date.year  $date.month  $date.day
                   1792: 
                   1793: @cookie2[]
                   1794: #=$cookie:clientType[$.value[test]]=<br>
1.159     paf      1795: =$cookie:CLASS.clientType=<br>
1.15      paf      1796: 
                   1797: 
                   1798: @tableset[]
                   1799: $a[^table::set{a
                   1800: 1
                   1801: 2}]
                   1802: ^eval(100\$a)
                   1803: 
                   1804: 
                   1805: 
                   1806: @zzz[]
                   1807: 
                   1808: 
                   1809: $constructor[
                   1810: <block1 name="main_srvr" type="0" label="Основное тело" />
                   1811: <block2 name="main_srvr2" type="0" label="Основное тело" />
                   1812: ]
                   1813: 
                   1814: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                   1815: <block-list>^untaint[as-is]{$constructor}</block-list>}]
                   1816: 
                   1817: $children[$constr.documentElement.childNodes]
                   1818: ^if($children){
                   1819: ^for[i](1;^children._count[]){
                   1820:        $node[$children.$i]
                   1821:        $node.nodeName<br>
                   1822: }
                   1823: }
                   1824:    
                   1825: 
                   1826: @thashforeach3[]
                   1827: $h[
                   1828:        $.a[1] 
                   1829:        $.b[2]
                   1830: ]
                   1831: $c[^table::set{a
                   1832: ^h.foreach[key;value]{$value
                   1833: }}]
                   1834: $c.a
                   1835: 
                   1836: @thashforeach2[]
                   1837: $h[
                   1838:        $.a[1] 
                   1839:        $.b[2]
                   1840: ]
                   1841: $c[
                   1842: ^h.foreach[key;value]{
                   1843:        $.$key[$value]
                   1844: }
                   1845: ]
                   1846: $c.b
                   1847: 
                   1848: @thashforeach[]
                   1849: $h[
                   1850:        $.a[1] 
                   1851:        $.b[2]
                   1852: ]
                   1853: ^h.foreach[key;value]{
                   1854:        $key=$value<br>
                   1855: }
                   1856: 
                   1857: @thashdelete[]
                   1858: $h[$.a[1] $.b[2]]
                   1859: was:<br>
                   1860: count=^h._count[] <br>
                   1861: b='$h.b' <br>
                   1862: 
                   1863: ^h.delete[b] 
                   1864: 
                   1865: now:<br>
                   1866: count=^h._count[] <br>
                   1867: b='$h.b' 
                   1868: 
                   1869: @sappend[]
                   1870: $test[123]
                   1871: ^test.save[test]
                   1872: ^test.save[append;test]
                   1873: 
                   1874: @tappend[]
                   1875: $test[^table::set{a    b
                   1876: a1     b1}]
                   1877: ^test.save[test]
                   1878: $test[^table::set{a    b
                   1879: a2     b2}]
                   1880: ^test.save[append;test]
                   1881: 
                   1882: 
                   1883: @tform[]
                   1884: ^if(def $form:new_file){y}{n}
                   1885: <form method="post" enctype="multipart/form-data">
                   1886: <input type="file" name="new_file" />
                   1887: <input type=submit>
                   1888: </input>
                   1889: 
                   1890: @formattest[]
                   1891: $size(15.124)
                   1892: 
                   1893: ^size.format{%.2f}
                   1894: 
                   1895: @filelist[]
                   1896: $html[^file:list[.;\.html^$]]
                   1897: ^html.menu{
                   1898:        $html.name<br>
                   1899: }
                   1900: <hr>
                   1901: 
                   1902: @безнадёжна_попытка_поправить_непоправимое[]
                   1903: $dom_from_disk[^xdoc::load[input.xml]]
                   1904: $dom_created_in_air[^xdoc::create[doc]]
                   1905: ^dom_created_in_air.documentElement.appendChild[^dom_from_disk.documentElement.cloneNode(1)]
                   1906: ^show_xdoc2[$dom_created_in_air]
                   1907: 
                   1908: 
                   1909: @tcache[]
                   1910: #^hashfile:clear[cache]
                   1911: $code[^hashfile::open[$DB_HOME;cache]]
                   1912: ^code.cache[key](2){
                   1913:        ^math:random(100)
                   1914: #      ^code.delete[]
                   1915: }
                   1916: 
                   1917: @thashfileexp[]
                   1918: $hf[^hashfile::open[$DB_HOME;hashfile]]
                   1919: $hf.paf[$.value[крут] $.expires(3)]
                   1920: paf=$hf.paf
                   1921: <hr>
                   1922: ^hf.foreach[key;value]{
                   1923:        $key=$value<br>
                   1924: }
                   1925: <hr>
                   1926: $hash[^hf.hash[]]
                   1927: =$hash.paf=
                   1928: <hr>
                   1929: 
                   1930: @tcounter[]
                   1931: ^tcounterone[$DB_HOME]
                   1932: other root:
                   1933: ^tcounterone[${DB_HOME}2]
                   1934: again, first:
                   1935: ^tcounterone[$DB_HOME]
                   1936: 
                   1937: @tcounterone[DB_HOME]
                   1938: $counter[^hashfile::open[$DB_HOME;counter]]
                   1939: #^counter.clear[]
                   1940: ^counter.transaction{
                   1941: #      $counter.value(10)
                   1942:        $counter.value($counter.value+1)
                   1943: #      ^counter.delete[value]
                   1944:        $counter.value
                   1945: }
                   1946: <hr>
                   1947: ^rem{
                   1948: $hash[^counter.hash[]]
                   1949: =$hash.value=
                   1950: <hr>
                   1951: }
                   1952: 
                   1953: @tablehash[]
                   1954: $productList[^table::set{id    name
                   1955: 1      носки
                   1956: 2      валенки
                   1957: 3      ушанка
                   1958: }]
                   1959: 
                   1960: #скажем, у первого дилера
                   1961: $firstPriceList[^table::set{id price
                   1962: 1      0.3
                   1963: 3      1000
                   1964: }]
                   1965: 
                   1966: $firstPriceHash[^firstPriceList.hash[id]]
                   1967: 
                   1968: ^productList.menu{
                   1969:     продукт "$productList.name" | цена у first: $firstPriceHash.[$productList.id].price<br>
                   1970: }
                   1971: 
                   1972: 
                   1973: @hashfile[]
                   1974: $hf[^hashfile::assign[hashfile]]
                   1975: #$hf.paf[крут5]
                   1976: paf=$hf.paf
                   1977: 
                   1978: @formclass[]
                   1979: ^$form:CLASS.a=$form:CLASS.a
                   1980: 
                   1981: @domdata[]
                   1982: ^if(1){
                   1983: #      $a{^hren[]}
                   1984: }
                   1985: $a
                   1986: $xdoc[^xdoc::create[doc]]
                   1987: $doc[$xdoc.documentElement]
                   1988: $name[^doc.appendChild[^xdoc.createElement[name]]]
                   1989: $text[^name.appendChild[^xdoc.createTextNode[петросян&coz]]]
                   1990: ^untaint[as-is]{=$text.nodeValue=}
                   1991: 
                   1992: @domedit[]
                   1993: ^domdata[]
                   1994: #$paf.nodeName<br>
                   1995: #$doc.documentElement.nodeName<br>
                   1996: 
                   1997: ^show_xnode1[$xdoc.documentElement;0;1]
                   1998: <hr>
                   1999: ^show_xdoc2[$xdoc]
                   2000: <hr>
                   2001: 
                   2002: @domxslt[]
                   2003: ^domdata[]
                   2004: ^show_xdoc2[^xdoc.transform[global.xsl;$.param1[123/]]]
                   2005: <hr>
                   2006: 
                   2007: @lsplit2[]
                   2008: $path[/optics/]
                   2009: $pathTable[^path.lsplit[/]]
                   2010: ^pathTable.menu{
                   2011:        ^if(def $pathTable.piece){
                   2012:                =$pathTable.piece=
                   2013:        }
                   2014: }
                   2015: 
                   2016: 
                   2017: @faceesize[]
                   2018: $k(2)
                   2019: $pict[^image::load[paf.gif]]
                   2020: $small[^image::create($pict.width/$k;$pict.height/$k)]
                   2021: ^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;250)
                   2022: $response:body[^small.gif[]]
                   2023: 
                   2024: @imageresize[]
                   2025: $k(2)
                   2026: $pict[^image::create(400*$k;200*$k)]
                   2027: $pict.line-width(2)
                   2028: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
                   2029: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-20;$pict.height-20;0+20;360-20;0xff0000)
                   2030: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
                   2031: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-20;0x0000ff)
                   2032: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+20;360-20;0xff0000)
                   2033: $response:body[^pict.gif[]]
                   2034: 
                   2035: #$small[^image::create($pict.width/$k;$pict.height/$k)]
                   2036: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0)
                   2037: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;0)
                   2038: 
                   2039: #$response:body[^small.gif[]]
                   2040: 
                   2041: 
                   2042: @tintdefault[]
                   2043: #$abc[abc]
                   2044: $abc[33]
                   2045: ^abc.int[z]
                   2046: #^abc.int(123)
                   2047: 
                   2048: @ifassignhash[]
                   2049: $h[^if(1){$.a(1);$.a(2)}]
                   2050: $h.a
                   2051: 
                   2052: @ifpasshash[]
                   2053: $a[$.e[a]]
                   2054: $b[$.e[b]]
                   2055: ^ifpasshashdest[^if(1){$a;$b}]
                   2056: #$x[^if(1){$a}{$b}]
                   2057: #^ifpasshashdest[$x]
                   2058: 
                   2059: @ifpasshashdest[p]
                   2060: $p.e
                   2061: 
                   2062: @movedir[]
                   2063: ^file:move[a;deeper/a]
                   2064: 
                   2065: @replace[]
                   2066: $a[12^;3]
                   2067: ^a.replace[^table::set{from    to
                   2068: 2^;    !
                   2069: }]
                   2070: 
                   2071: 
                   2072: @set[]
                   2073: ^setdata[]
                   2074: ^a.add[$b]
                   2075: add:$a.3<br>
                   2076: 
                   2077: ^setdata[]
                   2078: ^a.sub[$b]
                   2079: sub2:$a.2<br>
                   2080: sub1:$a.1<br>
                   2081: 
                   2082: ^setdata[]
                   2083: $c[^a.union[$b]]
                   2084: union3:$c.3<br>
                   2085: union2:$c.2<br>
                   2086: 
                   2087: ^setdata[]
                   2088: $c[^a.intersection[$b]]
                   2089: intersection3:$c.3<br>
                   2090: intersection2:$c.2<br>
                   2091: 
                   2092: ^setdata[]
                   2093: intersects:^if(^a.intersects[$b]){y;n}<br>
                   2094: intersects2:^if(^a.intersects[ ]){y;n}<br>
                   2095: 
                   2096: 
                   2097: <hr>
                   2098: 
                   2099: @setdata[]
                   2100: $a[$.1[a1] $.2[a2]]
                   2101: $b[        $.2[b2] $.3[b3]]
                   2102: 
                   2103: 
                   2104: @hash[]
                   2105: $h[^hash::create[$._default[123]]]
                   2106: $h.paf[not kretin]
                   2107: $h.paf<br>
                   2108: =$h.that=<br>
                   2109: 
                   2110: @methresult[]
                   2111: $result[^table::set{1}]
                   2112: 
                   2113: @terror[]
                   2114: ^error[method z must be called with z]
                   2115: 
                   2116: @syntax1[]
                   2117: #^a[^b]
                   2118: 
                   2119: @syntax2[]
                   2120: #^a[
                   2121: 
                   2122: @ssave[]
                   2123: $abc[abc]
                   2124: ^abc.save[abc]
                   2125: 
                   2126: @calendar[]
1.103     paf      2127: $year(2002)
                   2128: $month(12)
1.84      paf      2129: ${year}-${month}:<br>
                   2130: $week_days[^date:calendar[rus]($year;$month)]
1.15      paf      2131: <pre>
1.101     paf      2132: ^week_days.menu{^for[wday](0;6){^if($week_days.$wday){$week_days.$wday;&nbsp^;&nbsp^;} }=$week_days.week,$week_days.year=<br>}
1.15      paf      2133: </pre>
                   2134: 
                   2135: @thash[]
                   2136: $table[^table::set{id  name    age
                   2137: 1      paf     278
                   2138: 2      пиф     234
                   2139: }]
                   2140: $hash[^table.hash[id;^table::set[nameless]{id
                   2141: name}]]
                   2142: $hash.2.id $hash.2.name $hash.2.age
                   2143: 
                   2144: @tdef[]
                   2145: $s[0]
                   2146: if 0=^if($s){}{n}<br>
                   2147: if def 0=^if(def $s){y}{}<br>
                   2148: <hr>
                   2149: 
                   2150: @ford[]
                   2151: ^for[i](0;5){$i}{($i)}
                   2152: 
                   2153: @tif[]
                   2154: ^if[def]{y;n}
                   2155: 
                   2156: @image[]
                   2157: $pict[^image::create(400;200)]
                   2158: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
                   2159: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-10;$pict.height-10;0+10;360-10;0xff0000)
                   2160: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
                   2161: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-10;0x0000ff)
                   2162: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+10;360-10;0xff0000)
                   2163: $response:body[^pict.gif[]]
                   2164: 
                   2165: 
                   2166: 
                   2167: @mail2[]
                   2168: ^mail:send[
1.139     paf      2169:        $.message-id[<6615%1@parser.ru>]
1.15      paf      2170:        $.content-type[$.value[text/plain] $.charset[windows-1251]]
                   2171:        $.from[Александр Петросян <paf@design.ru>]
                   2172:        $.to[Александр Петросян <paf@design.ru>]
1.134     paf      2173:        $.subject[проверка проверка]
                   2174:        $.text[проверка]
1.15      paf      2175: ]
                   2176: 
                   2177: @cookie[]
1.115     paf      2178: #$env:HTTP_COOKIE<br>
1.15      paf      2179: 
                   2180: #$cookie:переменная[test тест ТЕСТ2]
                   2181: =$cookie:переменная=<br>
                   2182: #$cookie:переменная2[test тест ТЕСТ3]
                   2183: =$cookie:переменная2=<br>
                   2184: =$cookie:CLASS.переменная2=<br>
                   2185: 
                   2186: @response[]
                   2187: #^if($form:reload){
                   2188:        $response:refresh[$.value[0] $.url[./t.html?uri=$env:SERVER_NAME]]
                   2189: #}
                   2190: 
                   2191: @xslt[]
                   2192: ^xdata[]
                   2193: $transformed[^xdoc.transform[global.xsl;$.param1[123/]]]
                   2194: ^show_xdoc2[$transformed]
                   2195: 
                   2196: @regexp2[]
                   2197: $s[  select]
                   2198: $s[^s.match[^^\s*][]{!}]
                   2199: $s
                   2200: 
                   2201: @header[]
                   2202: $response:refresh[
                   2203:        $.value[0]
                   2204:        $.url[http://design.ru?a=^taint[123]]
                   2205: ]
                   2206: 
                   2207: @ttablerem[]
                   2208: $table[^table::load[a.cfg]]
                   2209: ^table.menu{$table.a}
                   2210: 
                   2211: @tconnect[]
                   2212: ^connect[mysql://test:test@paf/test?charset=cp1251_koi8&compress=1&timeout=1&named_pipe=1]{
                   2213: $tables[^table::sql{show tables}]
                   2214: #$cols[^tables.columns[]]
                   2215: #$cols.column
                   2216: ^tables.menu{
                   2217:        $tables.[Tables_in_test]<br>
                   2218: }
                   2219: }
                   2220: 
                   2221: @pcre[]
                   2222: $s[1 2]
                   2223: ^s.match[\s;ig]{!}
                   2224: #^s.match[\d;ig]{!}
                   2225: 
                   2226: 
                   2227: @regexp[]
                   2228: $s[abcАБВ]
                   2229: ^if(^s.match[б][i]){y}{n}
                   2230: 
                   2231: @mail[]
                   2232: #$ORIGINS(1)
                   2233: ^mail:send[
                   2234:        $.from[paf@design.ru]
                   2235:        $.to[paf@design.ru]
                   2236:        $.body[1
                   2237:        
                   2238:        2
                   2239:        
                   2240:        
                   2241:                3]
                   2242: ]
                   2243: 
                   2244: @fori[][i]
                   2245: ^for[i](1;3){... =$i= ...}
                   2246: 
                   2247: @xdata0[]
                   2248: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
                   2249: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
                   2250: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                   2251: <people>
                   2252:        <man id="1" имя="word слово">
                   2253:                <name>P&#171^;AF        B</name>
                   2254:        </man>
                   2255:                <man id="2">
                   2256:                        <name>ПИФ^taint[&]</name>
                   2257:                </man>
                   2258: </people>
                   2259: }]
                   2260: 
                   2261: @xdata[]
                   2262: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
1.156     paf      2263: $xdoc[^xdoc::create{<?xml version="1.0" encoding="windows-1251"?>
1.15      paf      2264: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                   2265: <people>
                   2266:        <man id="1" имя="word слово">
                   2267:                <name>P&#171^;AF        B</name>
                   2268:        </man>
                   2269:                <man id="2">
                   2270:             <name>ПИФ^taint[&]</name>
                   2271:                </man>
                   2272: </people>
1.156     paf      2273: }]
1.15      paf      2274: 
                   2275: @xml[]
                   2276: ^xdata[]
                   2277: 
                   2278: ^show_xdoc2[$xdoc]<hr>
                   2279: #^show_xnode1[$xdoc]<hr>
                   2280: $people[^xdoc.select[*/man]]
                   2281: #^show1[]
                   2282: ^show_xnodes1[$people]<hr>
                   2283: #^people.0.owner.hren[]
                   2284: 
                   2285: ^show_xnode1[^xdoc.selectSingle[*/man[2]/name];0;1]<hr>
                   2286: 
                   2287: by id:
                   2288: ^show_xnode1[^xdoc.getElementById[1];0;1]
                   2289: <hr>
                   2290: 
                   2291: @show1[array]
                   2292: ^for[i](0;^array._count[]-1){
                   2293:     $x[$array.$i]
                   2294:        $x.firstChild.nodeValue: 
                   2295:                $pattributes[$x.parentNode.attributes]
                   2296:                ^if(^pattributes._count[]){
                   2297:                        $pattributes.id.name=$pattributes.id.nodeValue
                   2298:                }
                   2299:        <br>
                   2300: }
                   2301:        
                   2302: @show_xnodes1[array][i]
                   2303: ^for[i](0;^array._count[]-1){
                   2304:        ^show_xnode1[$array.$i;0;1]
                   2305: }
                   2306: 
                   2307: @show_xnode1[x;level;single][l]
                   2308: ^if(def $x){
                   2309:     ^for[l](0;$level-1){&nbsp^;&nbsp^;&nbsp^;&nbsp^;}
                   2310:     ^if($x.nodeType == $xnode:ELEMENT_NODE){
                   2311:        &lt^;$x.nodeName
                   2312:            $pairs[$x.attributes]
                   2313:            ^if(def $pairs){
                   2314:                $names[^pairs._keys[]]
                   2315:                ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"}
                   2316:            }
                   2317:            &gt^;
                   2318:     }{
                   2319:        [$x.nodeType]
                   2320:     }
                   2321:     
                   2322:     ^if(def $x.nodeValue){$x.nodeValue}<br>
                   2323:     ^show_xnode1[$x.firstChild]($level+1)
                   2324:     ^if(!$single){
                   2325:            ^show_xnode1[$x.nextSibling]($level)
                   2326:     }
                   2327: 
                   2328:     ^if($x.nodeType == $xnode:ELEMENT_NODE){
                   2329:     ^for[l](0;$level-1){&nbsp^;&nbsp^;&nbsp^;&nbsp^;}&lt^;/$x.nodeName&gt^;<br>
                   2330:     }
                   2331: }
                   2332: 
                   2333: @show_xdoc2[xdoc]
                   2334: ^xdoc.save[out/save.xml;
                   2335: #      $.encoding[utf-8]
                   2336:        $.method[xml]
                   2337: ]
                   2338: $file[^xdoc.file[
                   2339:        $.encoding[utf-8]
                   2340:        $.method[html]
                   2341: ]]
                   2342: ^file.save[text;out/save_file.html]
                   2343: #$response:body[^xdoc.file[    $.media-type[text/paf]  ]]
                   2344: <pre>^taint[html][^xdoc.string[
                   2345:        $.method[html]
                   2346: #      $.encoding[utF-8]
                   2347: #      $.omit-xml-declaration[yes]
                   2348: #      $.standalone[no]
                   2349: #      -$.doctype-public[-//W3C//DTD XHTML]
                   2350: #      -$.doctype-system[/a/b/c/]
                   2351: #      $.indent[yes]
                   2352: #      $.media-type[text/paf]
                   2353: ]]
                   2354: </pre>

E-mail: