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

1.42      paf         1: @USE
                      2: t.p
1.15      paf         3: 
                      4: @autoz[]
                      5: $request:charset[windows-1251]
                      6: $response:charset[windows-1251]
                      7: $response:content-type[$.value[text/html]$.charset[$response:charset]]
                      8: 
1.38      paf         9: #@postprocess[body]
                     10: #<b>$body</b>
                     11: #$result[123]
1.37      paf        12: 
1.15      paf        13: @main[]
1.46    ! paf        14: ^matchoptionpp[]
        !            15: #^txdocxnodechild[]
1.44      paf        16: #^tclasses[]
1.43      paf        17: #$math:PI
                     18: #^b:method[]
1.42      paf        19: #^main[]
1.41      paf        20: #^errort[]
1.44      paf        21: #^tselectNumber[]
1.39      paf        22: #$result[hello]
1.36      paf        23: #^invaliddate2[]
                     24: #^process2[]
                     25: #^casehashtext[]
1.35      paf        26: #^subjvaltest[]
                     27: #^tableselect0[]
1.34      paf        28: #^memnotest1[]
1.33      paf        29: #^transparams[]
1.32      paf        30: #^voidparams[]
1.31      paf        31: #^rolls2[]
1.30      paf        32: #^cacheexpireschanging[]
1.29      paf        33: #^cacheexpiresfixed[]
                     34: #^dateoffsets[]
                     35: #^exceptionTypes[]
1.28      paf        36: #^roll2[]
1.27      paf        37: #^rolls[]
1.25      paf        38: #^exceptions1[]
1.22      paf        39: #^locate_by_expr[]
1.18      paf        40: #^method_junction_params{...}
1.17      paf        41: #^verifyCookie[paf]
1.37      paf        42: #^execlangs[]
1.16      paf        43: #$t[^tobjeresult[]]$t.a
                     44: #^xmlprobs[]
1.15      paf        45: #^doubleprobs[]
                     46: #^math:random(-10)
                     47: #^divnamestop[]
                     48: #^arrayclone[]
                     49: #^operator_tricks[]
                     50: #^xoutputrusattr[]
                     51: #^xdocset1[]
                     52: #^regexp3[]
                     53: #^exec2[]
                     54: #^tlock[]
                     55: #^xmloutattrwithoutvalue[]
                     56: #^precisionProblem[]
                     57: #^xpath[]
                     58: #^ttablesetlang[]
                     59: #^mail3[]
                     60: #^ttime[]
                     61: #^tupper[]
                     62: #^treplace[]
                     63: #^xslt2[]
                     64: #^tcache2[]
                     65: #$ORIGINS(1)
                     66: #$t[^table::set{a b} ^table::set{c d}]
                     67: #^ttaintuntaint[]
                     68: #^tappend2[]
                     69: #^badvsnprintf[]
                     70: #^badoracequoting[]
                     71: #^badconstructors[]
                     72: #^xloadwrongtable[]
                     73: #^xsetwrongtable[]
                     74: #^if($form:test){y}{n}
                     75: #^tablecolumnerror[]
                     76: #^roll[]
                     77: #^cookie2[]
                     78: #^tableset[]
                     79: #^math:PI.format{%.30f}
                     80: #^xchildren[]
                     81: #^thashforeach3[]
                     82: #^thashforeach2[]
                     83: #^thashforeach[]
                     84: #^thashdelete[]
                     85: #^connect[mysql://user:pass@cd.rinet.ru/db]{^void:sql{z} }
                     86: #^tappend[]
                     87: #^sappend[]
                     88: #^eval(10\3)<br>
                     89: #^tform[]
                     90: #^formattest[]
                     91: #^filelist[]
                     92: #^connect[mysql://user:pass@host]{ }
                     93: #^безнадёжна_попытка_поправить_непоправимое[]
                     94: #^tcache[]
                     95: #^thashfileexp[]
                     96: #^tcounter[]
                     97: #^tablehash[]
                     98: #j^hashfile[]
                     99: #^formclass[]
                    100: #^hren[]
                    101: #^domedit[]
                    102: #^domxslt[]
                    103: #^lsplit2[]
                    104: #^faceesize[]
                    105: #^imageresize[]
                    106: #^ifassignhash[]
                    107: #^tintdefault[]
                    108: #$response:status[404]
                    109: #^ifpasshash[]
                    110: #^movedir[]
                    111: #^replace[]
                    112: #^set[]
                    113: #^hash[]<hr>
                    114: #$t[^methresult[]] ->$t
                    115: #^terror[]
                    116: #^ssave[]
                    117: #^calendar[]
                    118: #^thash[]
                    119: #^tdef[]
                    120: #^ford[]
                    121: #^tif[]
                    122: #^image[]
                    123: #^mail2[]
                    124: #^cookie[]
                    125: #^response[]
                    126: #^regexp2[]
                    127: #^ttablerem[]
                    128: #^pcre[]
                    129: #^regexp[]<hr>
                    130: #^mail[]
                    131: #^exec[]
                    132: #^fori[]
                    133: #^tconnect[]
                    134: #^xslt[]
                    135: #^xml[]
                    136: #^header[]
                    137: <hr>
                    138: OK
1.46    ! paf       139: 
        !           140: @matchoptionpp[]
        !           141: $s[
        !           142: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
        !           143: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
        !           144: ]
        !           145: ^s.match[b;g']{($match.prematch|$match.match|$match.postmatch)}
        !           146: 
1.44      paf       147: 
                    148: @txdocxnodechild[]
                    149: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?><d/>}]
                    150: $xdoc.nodeName
                    151: ^xdoc.selectNumber[2*2]
1.45      paf       152: $xdoc:ELEMENT_NODE
1.44      paf       153: 
                    154: 
                    155: @tclasses[]
                    156: $t[^t::create[]]
                    157: ^t.method[]
                    158: <hr>
                    159: ^t.base_method[]
                    160: 
1.40      paf       161: 
                    162: @errort[]
1.42      paf       163: ^xdoc::create[a]
1.40      paf       164: #^throw[user;here;this]
                    165: 
                    166: @tselectNumber[]
                    167: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><d attr="привет" n="123"/>}]
                    168: ^d.selectString[string(d/@attr)]<br>
                    169: ^d.selectNumber[2*2]<br>
                    170: ^d.selectNumber[number(/d/@n)+1]<br>
                    171: 
1.34      paf       172: 
1.36      paf       173: @invaliddate2[]
                    174: $d[^date::create(1018946575/60/60)] ^d.sql-string[]
                    175: 
                    176: @process2[]
                    177: ^^process{
                    178:        ^process{
                    179:                ^$a[^^if(0){^$.k[y]}{^$.k[^^hren[]n]}] ^$a.k
                    180:        }
                    181: }
                    182: 
1.35      paf       183: @casehashtext[]
                    184: $tt[1]
                    185: $tmp[
                    186:         ^switch[$tt]{
                    187:                 ^case[1]{
                    188:                         $.aaa[123]
                    189:                 }
                    190:                 ^case[DEFAULT]{
                    191:                         $.bbb[456]
                    192:                 }
                    193:         }
1.36      paf       194:         shit!
1.35      paf       195: ]
1.36      paf       196: #$tmp
1.35      paf       197: $tmp.aaa
                    198: 
                    199: @subjvaltest[]
                    200: $a12[val]
                    201: $b[12]
                    202: $a$b
                    203: 
1.34      paf       204: @tableselect0[]
                    205: $person[^table::create{name    height
                    206: paf    1.77
                    207: шохин  2.07
                    208: moko   1.77
                    209: }]
                    210: $nottoohigh[^person.select($person.height<2)]
                    211: ^nottoohigh.menu{$nottoohigh.name<br>}
1.32      paf       212: 
                    213: @transparams[]
                    214: $idoc[^xdoc::create{<?xml version="1.0" ?><doc/>}]
                    215: $odoc[^idoc.transform[global.xsl;
                    216:        $.param1['1']
                    217:        $.param2['2']
                    218: ]]
                    219: <pre>^taint[^odoc.string[$.method[html]]]
                    220: 
                    221: @memnotest1[]
                    222: ^for[i](0;4000){
                    223: 
                    224:  $xxxx[$i]
                    225:  $xxxx
                    226: 
                    227: }
                    228: 
                    229: @memnotest1notes[]
                    230: одна итерация цикла:
                    231: [Mon Apr  8 20:12:02 2002] execution-------------------------|
1.35      paf       232: '469641+=28 wcodeframe -> 0 !optimize[3]''469669+=49 string от {} -> 0 optimize[3]'
1.32      paf       233: [Mon Apr  8 20:12:02 2002] 12:STRING__WRITE
                    234: [Mon Apr  8 20:12:02 2002]  "|| "
                    235: [Mon Apr  8 20:12:02 2002] 12:WITH_ROOT
                    236: [Mon Apr  8 20:12:02 2002] 13:VALUE
                    237: [Mon Apr  8 20:12:02 2002]  "xxxx" string
1.35      paf       238: [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       239: [Mon Apr  8 20:12:02 2002] 16:WITH_READ
                    240: [Mon Apr  8 20:12:02 2002] 17:VALUE
                    241: [Mon Apr  8 20:12:02 2002]  "i" string
                    242: [Mon Apr  8 20:12:02 2002] 18:GET_ELEMENT
1.35      paf       243: [Mon Apr  8 20:12:02 2002] 17:WRITE_VALUE'469452+=40 MAX_NUMBER -> !~2 actual digits''469492+=49 -> 41 !'
                    244: [Mon Apr  8 20:12:02 2002] 16:REDUCE_EWPOOL'469541+=24 VString -> 0 optimize[5]'
1.32      paf       245: [Mon Apr  8 20:12:02 2002] 15:CONSTRUCT_VALUE
                    246: [Mon Apr  8 20:12:02 2002] 12:STRING__WRITE
                    247: [Mon Apr  8 20:12:02 2002]  "| "
                    248: [Mon Apr  8 20:12:02 2002] 12:WITH_READ
                    249: [Mon Apr  8 20:12:02 2002] 13:VALUE
                    250: [Mon Apr  8 20:12:02 2002]  "xxxx" string
                    251: [Mon Apr  8 20:12:02 2002] 14:GET_ELEMENT
                    252: [Mon Apr  8 20:12:02 2002] 13:WRITE_VALUE'469573+=41 string expand nothing for now'
                    253: [Mon Apr  8 20:12:02 2002] 12:STRING__WRITE
1.35      paf       254: [Mon Apr  8 20:12:02 2002]  "||"'469617+=24 VString -> 0 !optimize[6]'
1.32      paf       255: [Mon Apr  8 20:12:02 2002] <-ja returned
                    256: [Mon Apr  8 20:12:02 2002] ja->
                    257: 
                    258: 201/328=0.612804878049 %%optimized
                    259: 
                    260: 1.
                    261: CREATE_*POOL
                    262:     сделать
                    263: *POOL_POOLED+CODE
                    264:     где
                    265:         wwrapper
                    266:         и(возможно) wcodeframe
                    267:         +string
                    268:         стековая переменная
                    269: 
                    270: 2.
                    271: избавиться от обёртки при возврате результата process [см. тело _for]
                    272: 
                    273: 3.
                    274: сделать callback для process, чтобы вынести invariants из _for & co.
                    275: 
                    276: 4.
                    277:  @todo склеить get_element и write_value (при вставлении? write_value)
                    278: 
                    279: 5.
                    280: reduce_*pool -> вариант получить именно string, без VString обёртки [часто
                    281: обёртка сразу выбрасывается = не нужна]
                    282: 
                    283: 6.
                    284: process вариант получить именно string, без VString обёртки [часто обёртка
                    285: сразу выбрасывается = не нужна]
                    286: 
                    287: 7.
                    288: string head, убить 8 байт неправильной link
1.31      paf       289: 
                    290: @voidparams[]
                    291: ^voidparamsm[$form:field]
                    292: 
                    293: @voidparamsm[p]
                    294: ^p.int(123)
1.29      paf       295: 
1.30      paf       296: @rolls2[]
                    297: $now[^date::now[]]
                    298: $d[^date::create($now.year;$now.month)] ^d.sql-string[]<br>
                    299: ^for[i](1;12){
                    300:        ^d.roll[month](-1) ^d.sql-string[]<br>
                    301: }
                    302: 
1.29      paf       303: @cacheexpireschanging[]
                    304: ^cache[$DB_HOME/keyключ][^date::now(+1)]{ ^rem{1 day}
                    305:     ^cache[^date::now(+4/24/60/60)]
                    306: #    ^cache(2)
1.30      paf       307: #    ^cache(0)
1.29      paf       308:        ^math:random(100)
                    309: }
                    310: 
                    311: 
                    312: 
                    313: @cacheexpiresfixed[]
                    314: ^cache[$DB_HOME/keyключ][^date::now(+2/24/60/60)]{
                    315:        ^math:random(100)
                    316: }
                    317: 
                    318: @dateoffsets[]
                    319: $d[^date::create(^date::now[]+1/24/60)]
                    320: #$d[^date::now(+1/24/60)]
                    321: ^d.sql-string[]
                    322: #$d
1.26      paf       323: 
1.28      paf       324: @exceptionTypes[]
                    325: #    parser.compile       ^test[}                компиляция (непарная скобка, ...)
                    326: #    parser.runtime       ^if(0).                параметры (больше/меньше, чем нужно, не тех типов, ...)
                    327: #    number.zerodivision  ^eval(1/0) ^eval(1%0)
                    328: #    number.format        ^eval(abc*5)
                    329: #    file.missing         ^file:delete[delme]                       not found
                    330: #    file.access          ^table::load[.]                       no rights
                    331: #    image.format         ^image::measure[index.html]                        not gif/jpg
                    332: #    sql.connect          ^connect[mysql://baduser:pass@host/db]{}                       not found/timeout
                    333: #    sql.execute          ^connect[mysql://okuser:pass@host/db]{^void:sql{select bad}}                       syntax error
                    334: #    xml                  ^xdoc::create{<forgot?>}                       any error in xml/xslt libs
                    335: #    smtp.connect                                not found/timeout
                    336: #    smtp.execute                                communication error
                    337: 
1.26      paf       338: @roll2[]
                    339: $d[^date::create(2002;4;2;2;2;3)] ^d.sql-string[]<br>
1.27      paf       340: ^d.roll[day](+365*3+1) ^d.sql-string[]<br>
1.26      paf       341: 
1.25      paf       342: 
                    343: @rolls[]
                    344: $d[^date::create(2002;4;4)]
                    345: ^d.sql-string[]<br>
                    346: ^for[i](1;7){
                    347: ^d.roll[day](-1)
                    348: ^d.sql-string[]<br>
                    349: }
                    350: <hr>
                    351: $d[^date::create(2002;3;28)]
                    352: ^d.sql-string[]<br>
                    353: ^for[i](1;7){
                    354: ^d.roll[day](+1)
                    355: ^d.sql-string[]<br>
                    356: }
                    357: <hr>
                    358: $d[^date::create(2002;12;3)]
                    359: ^d.sql-string[]<br>
                    360: ^for[i](1;14){
                    361: ^d.roll[day](-1)
                    362: ^d.sql-string[]<br>
                    363: }
                    364: <hr>
                    365: $d[^date::create(2002;10;19)]
                    366: ^d.sql-string[]<br>
                    367: ^for[i](1;14){
                    368: ^d.roll[day](+1)
                    369: ^d.sql-string[]<br>
                    370: }
                    371: 
                    372: 
                    373: 
                    374: 
                    375: 
1.22      paf       376: 
                    377: @exceptions1[]
                    378: ^try{
                    379:        aaa
1.24      paf       380:        ^throw[custom1;paf;is stupid]
1.22      paf       381: }{
1.24      paf       382:        ^if($exception.type eq custom1){
1.28      paf       383: #              $exception.handled(1)
                    384:        ^throw[$exception]
1.24      paf       385:                type=$exception.type<br>
                    386:            source=$exception.source<br>
                    387:            file=$exception.file<br>
                    388:            lineno=$exception.lineno<br>
                    389:        comment=$exception.comment<br>
                    390:        }
1.22      paf       391: }
1.21      paf       392: 
                    393: @locate_by_expr[]
                    394: $t[^table::create{a    b
                    395: 1      nok
                    396: 2      ok
                    397: 3      nok
                    398: }]
                    399: ^if(^t.locate($t.a==2)){$t.b}{n}
1.17      paf       400: 
                    401: @method_junction_params[param]
                    402: ^if($param is junction){junction}{ne junction}
                    403: 
                    404: @verifyCookie[value] 
                    405: ^if($cookie:dummyvote eq $value){ 
                    406:        $result(1) 
                    407: }{ 
                    408:        $cookie:dummyvote[$value] 
                    409:        $result(0) 
                    410: }
1.16      paf       411: 
                    412: @execlangs[]
1.20      paf       413: $f[^file::exec[test.pl]]
1.36      paf       414: err:$f.stderr<br>
1.16      paf       415: ^process{$f.text}
                    416: #$c[^t.columns[]]
                    417: #^c.menu{
                    418: #* $c.column<br>
                    419: #}
1.36      paf       420: c:$t.c<br>
1.16      paf       421: 
                    422: @tobjeresult[]
                    423: ^table::create{a
                    424: 12}
1.15      paf       425: 
                    426: @xmlprobs[]
                    427: $xmlDataType[^xdoc::load[program.xml]]
                    428: #<pre>^taint[^xmlDataType.string[]]
                    429: $xmlDataTypes[^xmlDataType.select[programs/program[@id=4]/data]]
                    430: #=^xmlDataTypes._count[]=
                    431: =^xmlDataTypes.0.getAttribute[type-id]=
                    432: 
                    433: @doubleprobs[]
                    434: $1(^math:radians(180))
                    435: $2($math:PI)
                    436: ^if(^1.format[%.10f]==^2.format[%.10f]){y;n}
                    437: ^if($1==$2){y;n}
                    438: ^if(^math:radians(180)==$math:PI){y;n}
                    439: 
                    440: 
                    441: @divnamestop[]
                    442: $a(10)
                    443: ^eval($a\3)
                    444: 
                    445: @arrayclone[]
                    446: $t[^table::create{a    b
                    447: 1      11
                    448: 2      22
                    449: }]
                    450: $c[^table::create[$t]]
                    451: ^c.append{2    33}
                    452: ^t.count[]
                    453: ^c.count[]
                    454: 
                    455: @operator_tricks[]
                    456: ^if(1){$a[^t[]]}
                    457: $a!
                    458: $a($b)
                    459: ^if(1){y}{n}
                    460: $MAIN:a(^t[] eq OK)
                    461: #$MAIN:a(1)
                    462: ^if($a){y}{n}
                    463: #^if(1){y}{n}
                    464: $form:if
                    465: $a[$.n[1]]
                    466: $a.if
                    467: 
                    468: @xoutputrusattr[]
                    469: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><d attr="привет"/>}]
                    470: ^show_xdoc2[$d]
                    471: 
                    472: @xdocset1[]
                    473: $d[^xdoc::set{<?xml version="1.0"?><d>=^taint[&]=</d>}]
                    474: ^show_xdoc2[$d]
                    475: 
                    476: @regexp3[]
                    477: $s[abcАБВ]
                    478: ^if(^s.match[][i]){y}{n}
                    479: 
                    480: 
                    481: @exec2[]
                    482: $a[^file::exec[bin/t.cmd]]
                    483: <pre>^taint[$a.text]</pre>|$a.status|$a.stderr<hr>
                    484: 
                    485: 
                    486: @tlock[]
                    487: ^file:lock[lockfile]{
                    488:        code
                    489: }
                    490: 
                    491: @xmloutattrwithoutvalue[]
                    492: #$ORIGINS(1)
                    493: $doc[^xdoc::set{<?xml version="1.0"?><doc background="">zz</doc>}]
                    494: $doc[^doc.transform[global.xsl]]
                    495: =^taint[html][^doc.string[$.method[html]]]=
                    496: 
                    497: 
                    498: 
                    499: @precisionProblem[]
                    500: $a[123456789012345678901234567890]
                    501: $b(^a.double[])
                    502: ^b.format{%.20E}
                    503: <hr>
                    504: ^eval(2*2)
                    505: 
                    506: @xpath[]
                    507: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                    508: <document><block><p>привет</p></block></document>
                    509: }]
                    510: #^show_xdoc2[$xdoc]
                    511: $node[^xdoc.selectSingle[/document/block/p]]
                    512: ^if(def $node){
                    513:        ^if($node is string){
                    514:                $node
                    515:        }{
                    516:        ^if($node is hash){
                    517:                ^node._count[]
                    518:        }{
                    519:                $node.nodeType
                    520:        }
                    521:        }
                    522: #$node.firstChild.nodeValue
                    523: }{
                    524:        node not found
                    525: }
                    526: 
                    527: 
                    528: @ttablesetlang[]
                    529: $a-tab-b[a     b
                    530: 1      2]
                    531: 
                    532: $t[^table::set{$a-tab-b}]
                    533: =$t.a=
                    534: <hr>
                    535: 
                    536: $t[^table::set[nameless]{^taint[$a-tab-b]}]
                    537: =$t.0=
                    538: <hr>
                    539: 
                    540: $t[^table::set{^untaint{^taint[$a-tab-b]}}]
                    541: =$t.a=
                    542: 
                    543: #^t.append{1   2}
                    544: 
                    545: @mail3[]
                    546: ^mail:send[
                    547:        $.from[Александр Петросян <paf@design.ru>]
                    548:        $.to[Александр Петросян <paf@design.ru>]
                    549:        $.subject[проверка4]
                    550:        $.body[
                    551:                $.text[
                    552:                        $.content-type[$.value[text/plain] $.charset[windows-1251]]
                    553:                        $.body[проверка]
                    554:                ]
                    555:                $.attachment[
                    556:                        $.value[^file::load[text;index.html]]
                    557:                        $.file-name[привет всем.html]                   
                    558:                ]
                    559:        ]
                    560: ]
                    561: 
                    562: 
                    563: @ttime[]
                    564: $now[^date::now[]]
                    565: $now.hour:$now.minute
                    566: 
                    567: @tupper[]
                    568: $t[abcABCабвАБВ]
                    569: $t<br>
                    570: ^t.upper[]
                    571: 
                    572: @treplace[]
                    573: $copy-paste-clean[^table::set{a b
                    574: .      _
                    575: ,      _
                    576: +      _
                    577: &      _
                    578: ?      _
                    579: =      _}]
                    580: 
                    581: $cache_key[^taint[в.а,с+я]&был?тут=недавно.cache]
                    582: # почему-то этот replace роняет апач в 500 ошибку :(
                    583: #^cache_key.replace[$copy-paste-clean]
                    584: $test[abc]
                    585: ^test.save[$cache_key]saved<br>
                    586: $cache[^file:list[.;\.cache^$]]
                    587: ^file:delete[$cache_key]deleted($cache.name)<br>
                    588: 
                    589: 
                    590: 
                    591: @xslt2[]
                    592: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                    593: <document><block><p>привет</p></block></document>
                    594: }]
                    595: ^show_xdoc2[$xdoc]
                    596: ^show_xdoc2[^xdoc.transform[templates/_document.xslt]]
                    597: <hr>
                    598: 
                    599: 
                    600: @tcache2[]
                    601: ^cache[$DB_HOME/keyключ](2){
                    602:        ^math:random(100)
                    603: }
                    604: 
                    605: @ttaintuntaint[]
                    606: <!-- некий панковский заголовок с буковкой C в круглых скобках -->^taint[html][
                    607: 
                    608: ]zz
                    609: <hr>
                    610: ^untaint[html]{1^taint[  ]2  3}
                    611: 
                    612: 
                    613: @tappend2[]
                    614: $t[^table::set{a       b}]^t.append{1  2}$t.a
                    615: 
                    616: @badvsnprintf[]
                    617: ^connect[zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz]{
                    618: }
                    619: 
                    620: 
                    621: @badoracequoting[]
                    622: $SQL.connect-string[oracle://webspb:webpwd@mts?NLS_LANG=RUSSIAN_AMERICA.CL8MSWIN1251&NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS]
                    623: ^connect[$SQL.connect-string]{
                    624: ^void:sql{delete from paf}
                    625: ^void:sql{insert into paf values (1, '$form:text')}
                    626: $paf[^table::sql{select * from paf}]
                    627: ^paf.menu{
                    628:        $paf.id: ^untaint{$paf.block}<hr>
                    629: 
                    630: }
                    631: <hr>
                    632: 
                    633: 
                    634: ^rem{
                    635: $news[^table::sql{select description from news}[$.limit(3)]]
                    636: ^news.menu{
                    637:        ^untaint{$news.description}<hr>
                    638: 
                    639: }
                    640: <hr>
                    641: }
                    642: 
                    643: $tables[^table::sql{select table_name from user_tables}]
                    644: ^tables.menu{
                    645: $tables.table_name<br>
                    646: }
                    647: 
                    648: }
                    649: <hr>
                    650: $env:PATH
                    651: 
                    652: @badconstructors[]
                    653: $bred[^string::length[]]
                    654: $bred[^response::clear[]]
                    655: $bred[^int::int[]]
                    656: 
                    657: 
                    658: @xloadwrongtable[]
                    659: $constr[^xdoc::load[wrongtable.xml]]
                    660: ^show_xdoc2[$constr]
                    661: 
                    662: @xsetwrongtable[]
                    663: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251z" ?>
                    664: <block-list>^untaint[as-is]{$constructor}</block-list>}]
                    665: 
                    666: 
                    667: @tablecolumnerror[]
                    668: $t[^table::set{a}]
                    669: $t.$a
                    670: 
                    671: @roll[]
                    672: #$date[^date::set(1970;1;2)]
                    673: #^date.roll[month](-1)
                    674: $date[^date::set(2038;1;1)]
                    675: ^date.roll[month](+1)
                    676: $date.year  $date.month  $date.day
                    677: 
                    678: @cookie2[]
                    679: #=$cookie:clientType[$.value[test]]=<br>
                    680: =$cookie:clientType=<br>
                    681: 
                    682: 
                    683: @tableset[]
                    684: $a[^table::set{a
                    685: 1
                    686: 2}]
                    687: ^eval(100\$a)
                    688: 
                    689: 
                    690: 
                    691: @zzz[]
                    692: 
                    693: 
                    694: $constructor[
                    695: <block1 name="main_srvr" type="0" label="Основное тело" />
                    696: <block2 name="main_srvr2" type="0" label="Основное тело" />
                    697: ]
                    698: 
                    699: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                    700: <block-list>^untaint[as-is]{$constructor}</block-list>}]
                    701: 
                    702: $children[$constr.documentElement.childNodes]
                    703: ^if($children){
                    704: ^for[i](1;^children._count[]){
                    705:        $node[$children.$i]
                    706:        $node.nodeName<br>
                    707: }
                    708: }
                    709:    
                    710: 
                    711: @thashforeach3[]
                    712: $h[
                    713:        $.a[1] 
                    714:        $.b[2]
                    715: ]
                    716: $c[^table::set{a
                    717: ^h.foreach[key;value]{$value
                    718: }}]
                    719: $c.a
                    720: 
                    721: @thashforeach2[]
                    722: $h[
                    723:        $.a[1] 
                    724:        $.b[2]
                    725: ]
                    726: $c[
                    727: ^h.foreach[key;value]{
                    728:        $.$key[$value]
                    729: }
                    730: ]
                    731: $c.b
                    732: 
                    733: @thashforeach[]
                    734: $h[
                    735:        $.a[1] 
                    736:        $.b[2]
                    737: ]
                    738: ^h.foreach[key;value]{
                    739:        $key=$value<br>
                    740: }
                    741: 
                    742: @thashdelete[]
                    743: $h[$.a[1] $.b[2]]
                    744: was:<br>
                    745: count=^h._count[] <br>
                    746: b='$h.b' <br>
                    747: 
                    748: ^h.delete[b] 
                    749: 
                    750: now:<br>
                    751: count=^h._count[] <br>
                    752: b='$h.b' 
                    753: 
                    754: @sappend[]
                    755: $test[123]
                    756: ^test.save[test]
                    757: ^test.save[append;test]
                    758: 
                    759: @tappend[]
                    760: $test[^table::set{a    b
                    761: a1     b1}]
                    762: ^test.save[test]
                    763: $test[^table::set{a    b
                    764: a2     b2}]
                    765: ^test.save[append;test]
                    766: 
                    767: 
                    768: @tform[]
                    769: ^if(def $form:new_file){y}{n}
                    770: <form method="post" enctype="multipart/form-data">
                    771: <input type="file" name="new_file" />
                    772: <input type=submit>
                    773: </input>
                    774: 
                    775: @formattest[]
                    776: $size(15.124)
                    777: 
                    778: ^size.format{%.2f}
                    779: 
                    780: @filelist[]
                    781: $html[^file:list[.;\.html^$]]
                    782: ^html.menu{
                    783:        $html.name<br>
                    784: }
                    785: <hr>
                    786: 
                    787: @безнадёжна_попытка_поправить_непоправимое[]
                    788: $dom_from_disk[^xdoc::load[input.xml]]
                    789: $dom_created_in_air[^xdoc::create[doc]]
                    790: ^dom_created_in_air.documentElement.appendChild[^dom_from_disk.documentElement.cloneNode(1)]
                    791: ^show_xdoc2[$dom_created_in_air]
                    792: 
                    793: 
                    794: @tcache[]
                    795: #^hashfile:clear[cache]
                    796: $code[^hashfile::open[$DB_HOME;cache]]
                    797: ^code.cache[key](2){
                    798:        ^math:random(100)
                    799: #      ^code.delete[]
                    800: }
                    801: 
                    802: @thashfileexp[]
                    803: $hf[^hashfile::open[$DB_HOME;hashfile]]
                    804: $hf.paf[$.value[крут] $.expires(3)]
                    805: paf=$hf.paf
                    806: <hr>
                    807: ^hf.foreach[key;value]{
                    808:        $key=$value<br>
                    809: }
                    810: <hr>
                    811: $hash[^hf.hash[]]
                    812: =$hash.paf=
                    813: <hr>
                    814: 
                    815: @tcounter[]
                    816: ^tcounterone[$DB_HOME]
                    817: other root:
                    818: ^tcounterone[${DB_HOME}2]
                    819: again, first:
                    820: ^tcounterone[$DB_HOME]
                    821: 
                    822: @tcounterone[DB_HOME]
                    823: $counter[^hashfile::open[$DB_HOME;counter]]
                    824: #^counter.clear[]
                    825: ^counter.transaction{
                    826: #      $counter.value(10)
                    827:        $counter.value($counter.value+1)
                    828: #      ^counter.delete[value]
                    829:        $counter.value
                    830: }
                    831: <hr>
                    832: ^rem{
                    833: $hash[^counter.hash[]]
                    834: =$hash.value=
                    835: <hr>
                    836: }
                    837: 
                    838: @tablehash[]
                    839: $productList[^table::set{id    name
                    840: 1      носки
                    841: 2      валенки
                    842: 3      ушанка
                    843: }]
                    844: 
                    845: #скажем, у первого дилера
                    846: $firstPriceList[^table::set{id price
                    847: 1      0.3
                    848: 3      1000
                    849: }]
                    850: 
                    851: $firstPriceHash[^firstPriceList.hash[id]]
                    852: 
                    853: ^productList.menu{
                    854:     продукт "$productList.name" | цена у first: $firstPriceHash.[$productList.id].price<br>
                    855: }
                    856: 
                    857: 
                    858: @hashfile[]
                    859: $hf[^hashfile::assign[hashfile]]
                    860: #$hf.paf[крут5]
                    861: paf=$hf.paf
                    862: 
                    863: @formclass[]
                    864: ^$form:CLASS.a=$form:CLASS.a
                    865: 
                    866: @domdata[]
                    867: ^if(1){
                    868: #      $a{^hren[]}
                    869: }
                    870: $a
                    871: $xdoc[^xdoc::create[doc]]
                    872: $doc[$xdoc.documentElement]
                    873: $name[^doc.appendChild[^xdoc.createElement[name]]]
                    874: $text[^name.appendChild[^xdoc.createTextNode[петросян&coz]]]
                    875: ^untaint[as-is]{=$text.nodeValue=}
                    876: 
                    877: @domedit[]
                    878: ^domdata[]
                    879: #$paf.nodeName<br>
                    880: #$doc.documentElement.nodeName<br>
                    881: 
                    882: ^show_xnode1[$xdoc.documentElement;0;1]
                    883: <hr>
                    884: ^show_xdoc2[$xdoc]
                    885: <hr>
                    886: 
                    887: @domxslt[]
                    888: ^domdata[]
                    889: ^show_xdoc2[^xdoc.transform[global.xsl;$.param1[123/]]]
                    890: <hr>
                    891: 
                    892: @lsplit2[]
                    893: $path[/optics/]
                    894: $pathTable[^path.lsplit[/]]
                    895: ^pathTable.menu{
                    896:        ^if(def $pathTable.piece){
                    897:                =$pathTable.piece=
                    898:        }
                    899: }
                    900: 
                    901: 
                    902: @faceesize[]
                    903: $k(2)
                    904: $pict[^image::load[paf.gif]]
                    905: $small[^image::create($pict.width/$k;$pict.height/$k)]
                    906: ^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;250)
                    907: $response:body[^small.gif[]]
                    908: 
                    909: @imageresize[]
                    910: $k(2)
                    911: $pict[^image::create(400*$k;200*$k)]
                    912: $pict.line-width(2)
                    913: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
                    914: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-20;$pict.height-20;0+20;360-20;0xff0000)
                    915: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
                    916: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-20;0x0000ff)
                    917: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+20;360-20;0xff0000)
                    918: $response:body[^pict.gif[]]
                    919: 
                    920: #$small[^image::create($pict.width/$k;$pict.height/$k)]
                    921: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0)
                    922: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;0)
                    923: 
                    924: #$response:body[^small.gif[]]
                    925: 
                    926: 
                    927: @tintdefault[]
                    928: #$abc[abc]
                    929: $abc[33]
                    930: ^abc.int[z]
                    931: #^abc.int(123)
                    932: 
                    933: @ifassignhash[]
                    934: $h[^if(1){$.a(1);$.a(2)}]
                    935: $h.a
                    936: 
                    937: @ifpasshash[]
                    938: $a[$.e[a]]
                    939: $b[$.e[b]]
                    940: ^ifpasshashdest[^if(1){$a;$b}]
                    941: #$x[^if(1){$a}{$b}]
                    942: #^ifpasshashdest[$x]
                    943: 
                    944: @ifpasshashdest[p]
                    945: $p.e
                    946: 
                    947: @movedir[]
                    948: ^file:move[a;deeper/a]
                    949: 
                    950: @replace[]
                    951: $a[12^;3]
                    952: ^a.replace[^table::set{from    to
                    953: 2^;    !
                    954: }]
                    955: 
                    956: 
                    957: @set[]
                    958: ^setdata[]
                    959: ^a.add[$b]
                    960: add:$a.3<br>
                    961: 
                    962: ^setdata[]
                    963: ^a.sub[$b]
                    964: sub2:$a.2<br>
                    965: sub1:$a.1<br>
                    966: 
                    967: ^setdata[]
                    968: $c[^a.union[$b]]
                    969: union3:$c.3<br>
                    970: union2:$c.2<br>
                    971: 
                    972: ^setdata[]
                    973: $c[^a.intersection[$b]]
                    974: intersection3:$c.3<br>
                    975: intersection2:$c.2<br>
                    976: 
                    977: ^setdata[]
                    978: intersects:^if(^a.intersects[$b]){y;n}<br>
                    979: intersects2:^if(^a.intersects[ ]){y;n}<br>
                    980: 
                    981: 
                    982: <hr>
                    983: 
                    984: @setdata[]
                    985: $a[$.1[a1] $.2[a2]]
                    986: $b[        $.2[b2] $.3[b3]]
                    987: 
                    988: 
                    989: @hash[]
                    990: $h[^hash::create[$._default[123]]]
                    991: $h.paf[not kretin]
                    992: $h.paf<br>
                    993: =$h.that=<br>
                    994: 
                    995: @methresult[]
                    996: $result[^table::set{1}]
                    997: 
                    998: @terror[]
                    999: ^error[method z must be called with z]
                   1000: 
                   1001: @syntax1[]
                   1002: #^a[^b]
                   1003: 
                   1004: @syntax2[]
                   1005: #^a[
                   1006: 
                   1007: @ssave[]
                   1008: $abc[abc]
                   1009: ^abc.save[abc]
                   1010: 
                   1011: @calendar[]
                   1012: 2001;11:<br>
                   1013: $week_days[^date:calendar[rus](2001;11)]
                   1014: <pre>
                   1015: ^week_days.menu{^for[wday](0;7){^if($week_days.$wday){$week_days.$wday;&nbsp^;&nbsp^;} }<br>}
                   1016: </pre>
                   1017: 
                   1018: @thash[]
                   1019: $table[^table::set{id  name    age
                   1020: 1      paf     278
                   1021: 2      пиф     234
                   1022: }]
                   1023: $hash[^table.hash[id;^table::set[nameless]{id
                   1024: name}]]
                   1025: $hash.2.id $hash.2.name $hash.2.age
                   1026: 
                   1027: @tdef[]
                   1028: $s[0]
                   1029: if 0=^if($s){}{n}<br>
                   1030: if def 0=^if(def $s){y}{}<br>
                   1031: <hr>
                   1032: 
                   1033: @ford[]
                   1034: ^for[i](0;5){$i}{($i)}
                   1035: 
                   1036: @tif[]
                   1037: ^if[def]{y;n}
                   1038: 
                   1039: @image[]
                   1040: $pict[^image::create(400;200)]
                   1041: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
                   1042: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-10;$pict.height-10;0+10;360-10;0xff0000)
                   1043: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
                   1044: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-10;0x0000ff)
                   1045: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+10;360-10;0xff0000)
                   1046: $response:body[^pict.gif[]]
                   1047: 
                   1048: 
                   1049: 
                   1050: @mail2[]
                   1051: ^mail:send[
                   1052:        $.content-type[$.value[text/plain] $.charset[windows-1251]]
                   1053:        $.from[Александр Петросян <paf@design.ru>]
                   1054:        $.to[Александр Петросян <paf@design.ru>]
                   1055:        $.subject[проверка]
                   1056:        $.body[проверка]
                   1057: ]
                   1058: 
                   1059: @cookie[]
                   1060: $env:HTTP_COOKIE<br>
                   1061: 
                   1062: #$cookie:переменная[test тест ТЕСТ2]
                   1063: =$cookie:переменная=<br>
                   1064: #$cookie:переменная2[test тест ТЕСТ3]
                   1065: =$cookie:переменная2=<br>
                   1066: =$cookie:CLASS.переменная2=<br>
                   1067: 
                   1068: @response[]
                   1069: #^if($form:reload){
                   1070:        $response:refresh[$.value[0] $.url[./t.html?uri=$env:SERVER_NAME]]
                   1071: #}
                   1072: 
                   1073: @xslt[]
                   1074: ^xdata[]
                   1075: $transformed[^xdoc.transform[global.xsl;$.param1[123/]]]
                   1076: ^show_xdoc2[$transformed]
                   1077: 
                   1078: @regexp2[]
                   1079: $s[  select]
                   1080: $s[^s.match[^^\s*][]{!}]
                   1081: $s
                   1082: 
                   1083: @header[]
                   1084: $response:refresh[
                   1085:        $.value[0]
                   1086:        $.url[http://design.ru?a=^taint[123]]
                   1087: ]
                   1088: 
                   1089: @ttablerem[]
                   1090: $table[^table::load[a.cfg]]
                   1091: ^table.menu{$table.a}
                   1092: 
                   1093: @tconnect[]
                   1094: ^connect[mysql://test:test@paf/test?charset=cp1251_koi8&compress=1&timeout=1&named_pipe=1]{
                   1095: $tables[^table::sql{show tables}]
                   1096: #$cols[^tables.columns[]]
                   1097: #$cols.column
                   1098: ^tables.menu{
                   1099:        $tables.[Tables_in_test]<br>
                   1100: }
                   1101: }
                   1102: 
                   1103: @pcre[]
                   1104: $s[1 2]
                   1105: ^s.match[\s;ig]{!}
                   1106: #^s.match[\d;ig]{!}
                   1107: 
                   1108: 
                   1109: @regexp[]
                   1110: $s[abcАБВ]
                   1111: ^if(^s.match[б][i]){y}{n}
                   1112: 
                   1113: @mail[]
                   1114: #$ORIGINS(1)
                   1115: ^mail:send[
                   1116:        $.from[paf@design.ru]
                   1117:        $.to[paf@design.ru]
                   1118:        $.body[1
                   1119:        
                   1120:        2
                   1121:        
                   1122:        
                   1123:                3]
                   1124: ]
                   1125: 
                   1126: @exec[]
                   1127: $a[^file::exec[fc.exe;;a;b]]
                   1128: $a.status|$a.stderr<hr>
                   1129: 
                   1130: @fori[][i]
                   1131: ^for[i](1;3){... =$i= ...}
                   1132: 
                   1133: @xdata0[]
                   1134: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
                   1135: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
                   1136: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                   1137: <people>
                   1138:        <man id="1" имя="word слово">
                   1139:                <name>P&#171^;AF        B</name>
                   1140:        </man>
                   1141:                <man id="2">
                   1142:                        <name>ПИФ^taint[&]</name>
                   1143:                </man>
                   1144: </people>
                   1145: }]
                   1146: 
                   1147: @xdata[]
                   1148: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
                   1149: $xdoc[^xdoc::set{^process{<?xml version="1.0" encoding="windows-1251"?>
                   1150: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                   1151: <people>
                   1152:        <man id="1" имя="word слово">
                   1153:                <name>P&#171^;AF        B</name>
                   1154:        </man>
                   1155:                <man id="2">
                   1156:             <name>ПИФ^taint[&]</name>
                   1157:                </man>
                   1158: </people>
                   1159: }}]
                   1160: 
                   1161: @xml[]
                   1162: ^xdata[]
                   1163: 
                   1164: ^show_xdoc2[$xdoc]<hr>
                   1165: #^show_xnode1[$xdoc]<hr>
                   1166: $people[^xdoc.select[*/man]]
                   1167: #^show1[]
                   1168: ^show_xnodes1[$people]<hr>
                   1169: #^people.0.owner.hren[]
                   1170: 
                   1171: ^show_xnode1[^xdoc.selectSingle[*/man[2]/name];0;1]<hr>
                   1172: 
                   1173: by id:
                   1174: ^show_xnode1[^xdoc.getElementById[1];0;1]
                   1175: <hr>
                   1176: 
                   1177: @show1[array]
                   1178: ^for[i](0;^array._count[]-1){
                   1179:     $x[$array.$i]
                   1180:        $x.firstChild.nodeValue: 
                   1181:                $pattributes[$x.parentNode.attributes]
                   1182:                ^if(^pattributes._count[]){
                   1183:                        $pattributes.id.name=$pattributes.id.nodeValue
                   1184:                }
                   1185:        <br>
                   1186: }
                   1187:        
                   1188: @show_xnodes1[array][i]
                   1189: ^for[i](0;^array._count[]-1){
                   1190:        ^show_xnode1[$array.$i;0;1]
                   1191: }
                   1192: 
                   1193: @show_xnode1[x;level;single][l]
                   1194: ^if(def $x){
                   1195:     ^for[l](0;$level-1){&nbsp^;&nbsp^;&nbsp^;&nbsp^;}
                   1196:     ^if($x.nodeType == $xnode:ELEMENT_NODE){
                   1197:        &lt^;$x.nodeName
                   1198:            $pairs[$x.attributes]
                   1199:            ^if(def $pairs){
                   1200:                $names[^pairs._keys[]]
                   1201:                ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"}
                   1202:            }
                   1203:            &gt^;
                   1204:     }{
                   1205:        [$x.nodeType]
                   1206:     }
                   1207:     
                   1208:     ^if(def $x.nodeValue){$x.nodeValue}<br>
                   1209:     ^show_xnode1[$x.firstChild]($level+1)
                   1210:     ^if(!$single){
                   1211:            ^show_xnode1[$x.nextSibling]($level)
                   1212:     }
                   1213: 
                   1214:     ^if($x.nodeType == $xnode:ELEMENT_NODE){
                   1215:     ^for[l](0;$level-1){&nbsp^;&nbsp^;&nbsp^;&nbsp^;}&lt^;/$x.nodeName&gt^;<br>
                   1216:     }
                   1217: }
                   1218: 
                   1219: @show_xdoc2[xdoc]
                   1220: ^xdoc.save[out/save.xml;
                   1221: #      $.encoding[utf-8]
                   1222:        $.method[xml]
                   1223: ]
                   1224: $file[^xdoc.file[
                   1225:        $.encoding[utf-8]
                   1226:        $.method[html]
                   1227: ]]
                   1228: ^file.save[text;out/save_file.html]
                   1229: #$response:body[^xdoc.file[    $.media-type[text/paf]  ]]
                   1230: <pre>^taint[html][^xdoc.string[
                   1231:        $.method[html]
                   1232: #      $.encoding[utF-8]
                   1233: #      $.omit-xml-declaration[yes]
                   1234: #      $.standalone[no]
                   1235: #      -$.doctype-public[-//W3C//DTD XHTML]
                   1236: #      -$.doctype-system[/a/b/c/]
                   1237: #      $.indent[yes]
                   1238: #      $.media-type[text/paf]
                   1239: ]]
                   1240: </pre>

E-mail: