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

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

E-mail: