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

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

E-mail: